Slashdot Mirror


User: oliverthered

oliverthered's activity in the archive.

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

Comments · 5,212

  1. Re:False Economy on The Code Is The Design · · Score: 1

    'the sort of alternatives you propose aren't even close to fast or portable enough for our application'

    that's a shame, it's not my personal preferences so much as functional programming is 'easier' with linear methods, it's a shame that there isn't software for mathematical applications that can produce nice fast code but have a clean, linear layout.

  2. Re:Worth it? on LiveCD Lets You Try Out Project Looking Glass · · Score: 1

    For one windows at 1600x1200 with 32 bits resolution you'll need 7Meg, so you'll get less than 10 full windows on a 64 Meg card (Ignoring AGP for now). Then there are all the icons, either vector graphics or bitmaps lets say 128x128 with 8 mipmap levels... (about 1mb a piece) and then there's the text all vectors.

    So, in terms of optimum, memory were looking for a 128MB+ graphics card, 512MB should be fine.

    Then there's all those vectors modern cards with on GPU vector processing should be fine, older cards will just give you back buffer, clipping, scaling and transparency benefits until they run out of ram.

    UI's are not games, in some ways (vectors) they are far more complex.

    The current batch of GUI's cheat a lot, which is one reason why you don't get scaling Icons, window borders etc...

  3. Re:Worth it? on LiveCD Lets You Try Out Project Looking Glass · · Score: 1

    but what about back buffers and clipping regions?

    UI's aren't about how many polygons you can blast out, but how well you can handle vectors/fonts and buffers.

    You'd need a 64MB+ card for a 'moderate' UI, but modern 256MB+ cards should be able to cope with most UI tasks in a single pass.

  4. Re:Analogy time, boys and girls. on MGM v. Grokster: Here's Why P2P is Valuable · · Score: 1

    1st rule of knife fights, if they've pulled a knife and haven't stabbed you chances are they won't.

  5. Re:Analogy time, boys and girls. on MGM v. Grokster: Here's Why P2P is Valuable · · Score: 1

    What would he have to do to make you point your gun at him?

    I think anyone who owns a gun should seriously consider where the line is drawn.

    suggesting that shooting pheasants isn't murder makes you a serious dick head in my book, so were about even.

  6. Re:Analogy time, boys and girls. on MGM v. Grokster: Here's Why P2P is Valuable · · Score: 1

    -- Target shooting and sport. Pure entertainment, and good hand-eye coordination practice.

    Get a lazer gun..

    -- Self- and home defense. Good to stay alive if someone breaks into your home and tries to kill you.
    (because they found you gun and wondered if it worked!).
    -- Hunting. Mmm, pheasants taste good.
    Sorry, this comes under 'murder'.

    You should add, pointing at you local representative when he passes laws that prevent you from using p2p networks. Viva P2P.

  7. Re:False Economy on The Code Is The Design · · Score: 1

    Well I can count sheep till the cows come home.

    my post was a generalisation based on my belief that 95%+ of all code ever written can be easily tested without extreme AI. As you have said there are always exceptions to any rule, and you should know that the exceptions apply before you write a single line of code, in which case you use test cases and tables for validation of the IO (still no super AI needed).

    Is 95% good enough to say 'always' and ignore the other 5%, well under trading standards laws yes, military spec is something like 98%.

  8. Re:False Economy on The Code Is The Design · · Score: 1

    That's hardly a compelling argument

    Well, you argument was you were programming maths, which is why you shouldn't use counter, and make the code look more like maths.

    Did it occur to you that the assembly code generated by a compiler doesn't have to be particularly maintainable or human-readable?

    Yes, even it the worst possible case 'static code generated to be read by a machine and not by humans' the compiler still doesn't need to return all over the place to be efficient.

    The nested loops here are basically unavoidable; the only alternative in a typical structured programming language is to hide them inside functions, which is a bad idea for the reasons I described previously.

    well, if you cannot use break, and inline functions aren't 'good enough', I expect you doing top left triangle etc... where you can not easily break out of the for loop. In that case I would recommend finding something better suited to your need than c(even if it's just a pre-processor), more a mathematical less functional language, as you said 'the only alternative in a typical structured programming language'.

  9. Re:The mystery revealed on Sun Storms Deplete Ozone, Too · · Score: 1

    and of the other links? there correct I assume as you have nothing negative to say about them?

  10. Re:The ozone layer has WHAT to do with C-14? on Sun Storms Deplete Ozone, Too · · Score: 1

    Ok, I've gone through some of the google links and most of the sites have something to do with God.
    Carbon dating ultraviolet -"creation-science-prophecy" -photography -god

    doesn't throw up all the false positives.

    Also if the research from AMS shows a strong correlation between the size of the whole in the Ozone layer and beryllium isotopes, is that getting a little closer for you or do you need the million and one ways that beryllium isotopes are produced to be discounted first.

    Genrally the argument from the 'oh-no-it-doesn't' is , xyz's haven't been proven to cause abc for why should I stop using xyz's. Would you accept that the weight of the argument is a little more than 'we think the surface of titan is liquid'.

    A google for
    'ozone layer hole possible natural causes', doesn't come up with anything, not even a god link.

  11. Re:False Economy on The Code Is The Design · · Score: 1

    <b>Would you rather I wrote this statement as shown below?</b>
    productMatrix[productRow][productColum n] = matrixA[productRow][counter] * matrixB[counter][productColumn];</b>

    yes, i = srqt(-1) are you using imaginary numbers for your matrix elements.

    <b>Again, you are unwise to generalise too readily</b>
    ' I can cope with my checker giving me a few false positives'
    I didn't.
    ' Often I find the kind of people who think quicksort is a complicated algorithm don't really understand this, and sadly,'

    Quick sort is an easy algorithm, it's just a binary merge with an odd name, any programmer should be able to derive it using first principals. Unfortunately many programmers are overwhelmed with what they are programming and don't know enough to write good code. They often make statements like, but I need that return their or it's much clearer that way.

    I spend some of my time picking though compiler generated assembler that does all kinds of things, and you rarely see an early return.

    <b>Having done that, we would have gained no meaningful abstraction and no increase in reuse. However, we would have lost a lot of readability, and in scattering the algorithm over a wide area we would have crippled maintainability.</b>
    How wide?

    Anyhow, I expect you are writing something like (obviously with a few more levels)

    dosomething(a,b,c,d){
    if d = 0 return NAN;
    e = b * c / d;
    if e - d = 0 return NAN
    return a / (e - d);
    }

    which could be

    dosomething(a,b,c,timeoffset){
    result = NAN;
    if(timeoffset != 0 ){
    timetaken = b * c / timeoffset;
    if(distance - timeoffset != 0 )
    result = a / (timetaken - timeoffset);
    }

    return result
    }

    Now, why would anyone use my slightly more complicated version?
    well..

    For a start I can do this very easily.

    dosomething(a,b,c,timeoffset){
    result = NAN;
    if(time != 0 ){
    timetaken = b * c / timeoffset;
    if(timetaken - time != 0 )
    result = a / (timetaken - timeoffset);
    }
    print("inputs(a = %f, b = %f, c = %f, timeoffset = %f, returning\n", a, b, c, timeoffset, result);
    return result
    }

    n.b. I have only used a, b , c because I couldn't be bothered to think of proper names.

  12. Re:The ozone layer has WHAT to do with C-14? on Sun Storms Deplete Ozone, Too · · Score: 1

    Here's the whole section..

    Fourth, the ratio of C-14 to C-12 in the atmosphere is not constant. Although it was originally thought that there has always been about the same ratio, radiocarbon samples taken and cross dated using other techniques like dendrochronology have shown that the ratio of C-14 to C-12 has varied significantly during the history of the Earth. This variation is due to changes in the intensity of the cosmic radation bombardment of the Earth, and changes in the effectiveness of the Van Allen belts and the upper atmosphere to deflect that bombardment. For example, because of the recent depletion of the ozone layer in the stratosphere, we can expect there to be more C-14 in the atmosphere today than there was 20-30 years ago. To compensate for this variation, dates obtained from radiocarbon laboratories are now corrected using standard calibration tables developed in the past 15-20 years. When reading archaeological reports, be sure to check if the carbon-14 dates reported have been calibrated or not.

    This should be 'easy' to measure, as should nuclear explosions.

    are you sure that the The ultraviolet rays blocked by ozone are far too anemic to create or destroy C-14', they give you cancer so I assume they can produce free radicals and create carbon-14.
    Ultraviolet light is responsible for initiating chemical reactions through a process called photodissociation. Molecules are torn apart by the energy of the ultraviolet photon. Once the atoms are separated they can then come back together again; possibly, the atoms can form different combinations, thus allowing new molecules to be produced. Ozone is produced in this way, it is produced by the photodissociation of Oxygen. Oxygen is produced from the photodissociation of water. Some have judged that as much as 25% of the Oxygen in our world could come from reactions occurring in the upper atmosphere.

    Another link says.....

    These beryllium isotopes are created in the stratosphere when cosmic rays strike nitrogen atoms. AMS researchers are studying the concentration of these isotopes in falling snow and in air samples collected by high-altitude aircraft. Since beryllium isotopes attach readily to aerosols, they are helping scientists to understand aerosol movement in the upper atmosphere. Aerosol particles serve as host sites for chemical reactions which create the forms of chlorine that destroy ozone.

    My bogosity meter is mid-scale
    Well, some people still think the earth is flat.

  13. Re:The ozone layer has recovered??? on Sun Storms Deplete Ozone, Too · · Score: 1

    yes they have, they use dendrochronology, ice cores etc.. dating back thousands of years (some even before the bible says God created the Earth).

    For example, because of the recent depletion of the ozone layer in the stratosphere, we can expect there to be more C-14 in the atmosphere today than there was 20-30 years ago. To compensate for this variation, dates obtained from radiocarbon laboratories are now corrected using standard calibration tables developed in the past 15-20 years. When reading archaeological reports, be sure to check if the carbon-14 dates reported have been calibrated or not.

    happy.

  14. we've seen over the past 20 years or so.... on Sun Storms Deplete Ozone, Too · · Score: 1

    Ok, what else could it be?

    Sun Storms.

    Now, go into the lab, does it look like Sun Storms that have been about forever in my case or CfC's that have been about for most of my lifetime. because I'd rather be on the side of the CFC cautions than the Sun Storms skin cancer 1337 any day.

  15. Re:Needs DataGlyphs on Webcam Jigsaw Solver in 200 Lines of Python · · Score: 3, Informative

    It's an advert for DataGlyphs, showing how:

    "PARC DataGlyphs are a robust and unobtrusive method of embedding computer-readable data on surfaces such as paper, labels, plastic, glass, or metal.

    Basic DataGlyphs are a pattern of forward and backward slashes representing ones and zeroes. This pattern forms an evenly textured field.

    Unlike most barcodes, DataGlyphs are flexible in shape and size. Their structure and robust error correction also make them suitable for curved surfaces and other situations where barcodes fail.
    "

  16. Re:False Economy on The Code Is The Design · · Score: 1

    As a example this is some code I'm just about to send in as a patch... well the 1st version.
    res is wine standard.

    riid and iface are windows standard, I would have at least used result normally.

    Spot the bad return in the second example

    /*** Version 1 ***/

    /* IDirect3DSurface9 Interface follow: */
    HRESULT WINAPI IDirect3DSurface9Impl_GetContainer(LPDIRECT3DSURFA CE9 iface, REFIID riid, void** ppContainer) {
    IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
    HRESULT res;
    TRACE("(%p) Relay\n", This);

    /* The container returned from IWineD3DSurface_GetContainer is either a IWineD3DDevice,
    one of the subclasses of resource or a swapchain */
    IUnknown *IWineContainer = NULL;

    /* Get the IUnknown container. */
    res = IWineD3DSurface_GetContainer(This->wineD3DSurface, &IID_IUnknown, (void **)&IWineContainer);
    if (res == D3D_OK && IWineContainer != NULL) {

    /* Now find out what kind of container it is (so that we can get it's parent)*/
    IUnknown *IUnknownParent = NULL;
    IUnknown *myContainer = NULL;
    if(D3D_OK == IUnknown_QueryInterface(IWineContainer, &IID_IWineD3DDevice, (void **)&myContainer)){
    IWineD3DDevice_GetParent((IWineD3DDevice *)IWineContainer, &IUnknownParent);
    IUnknown_Release(myContainer);
    } else
    if(D3D_OK == IUnknown_QueryInterface(IWineContainer, &IID_IWineD3DBaseTexture, (void **)&myContainer)){
    IWineD3DBaseTexture_GetParent((IWineD3DBaseTexture *)IWineContainer, &IUnknownParent);
    IUnknown_Release(myContainer);
    } else
    if(D3D_OK == IUnknown_QueryInterface(IWineContainer, &IID_IWineD3DSwapChain, (void **)&myContainer)){
    IWineD3DBaseTexture_GetParent((IWineD3DBaseTexture *)IWineContainer, &IUnknownParent);
    IUnknown_Release(myContainer);
    }else{
    FIXME("Container is of unknown interface\n");
    }
    /* Tidy up.. */
    IUnknown_Release((IWineD3DDevice *)IWineContainer);

    /* Now, query the interface of the parent for the riid */
    if(IUnknownParent != NULL){
    res = IUnknown_QueryInterface(IUnknownParent, riid, ppContainer);

    /* Tidy up.. */
    IUnknown_Release(IUnknownParent);
    }

    }

    TRACE("(%p) : returning %p\n", This, *ppContainer);
    return res;
    }

    /*** Version 2 ***/

    /* IDirect3DSurface9 Interface follow: */
    HRESULT WINAPI IDirect3DSurface9Impl_GetContainer(LPDIRECT3DSURFA CE9 iface, REFIID riid, void** ppContainer) {
    IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
    TRACE("(%p) Relay\n", This);

    /* The container returned from IWineD3DSurface_GetContainer is either a IWineD3DDevice,
    one of the subclasses of resource or a swapchain */
    IUnknown *IWineContainer = NULL;

    /* Get the IUnknown container. */
    if(IWineD3DSurface_GetContainer(This->wineD3DSurfa ce, &IID_IUnknown, (void **)&IWineContainer) != D3D_OK){
    return;
    } else
    {
    if(IWineContainer != NULL) {

    /* Now find out what kind of container it is (so that we can get it's parent)*/
    IUnknown *IUnknownParent = NULL;

    if(D3D_OK == IUnknown_QueryInterface(IWineContainer, &IID_IWineD3DDevice, (void **)&myContainer)){
    IWineD3DDevice_GetParent((IWineD3DDevice *)IWineContainer, &IUnknownParent);
    IUnknown_Release(myContainer);
    if(IUnknownParent != NULL){
    res = IUnknown_QueryInterface(IUnknownParent, riid, ppContainer);
    /* Tidy up.. */
    IUnknown_Release(IUnknownParent);

  17. Re:False Economy on The Code Is The Design · · Score: 1

    What if I'm doing GUI work- X and Y refering to cartesian coordinates make great sense.

    Don't the x and y's belong to something, like screenx, imagex etc.. can't you use counter instead of i?

    Dictionary attack- how many devs do you know who use the full name rather than an abbreviation?

    The kind of devs who use screenx, imagex and counter. You can put commong abbreviations in the dictionary and for the rest why not use a codeCompleting Editor and type in the extra couple of chareters.

    Indentation- changing it once its in is a bad idea
    The idea isn't 'style', I don't mind if you use two tabs and three spaces, it's bad indentation ~= messy code that hasn't been looked over.

    Comment density- is too dense bad, or good? Probably in between, and probably depends on subject matter. I don't want a paragraph on a get function, but complex image quality algorithms deserve them. I won't get the linear algebra its doing without them.

    code complexity- I think we need a turing machine again


    Part and parcil, there are lot's of matricies for code complexity and automatic checking tools that look for, how deep do you nest, loops, gotos, calls, variables used the kind of stuff any compiler looks at, (function point analysis works loosly on code complexity on a larger scale.)

    mid function returns are good, its what stops your code from looking like spaghetti to avoid them
    bollox, write good code, refactor, maybe two functions is a thousand need mid function returns, an I can cope with my checker giving me a few false positives, no Turing AI just a human to flag the functions once.

    You can probably use some simple calcualtaions to work out if the nesting is good or bad based on the flow of execution and functional complexity.
    I'll post an example as a code reply.

    code reviews are good, cvs checkin rules can be good too.

  18. Re:False Economy on The Code Is The Design · · Score: 1

    Well there's the easy test....

    if(strlen(variable_name) 3)

    and the dictionary attack..

    if you adopt a standard you can check for class names being cased properly, instances being given the correct instance name, defines being properly cased etc...

    You can also check for: indentation, comment density (and verbosity) code complexity, returns used in mid function lots of nesting etc..

    and compile with -wError.

    A few simple tests and it would take the 'bad' programmer longer to work around them then to use proper names.

    Or, you could always use code review or paired programming.

  19. Re:...against someones will. on Software Patents Could Stop EU Linux Development · · Score: 1

    To correct my example.

    I should have put
    c = (a + 1)(b + 1) - (1 + 2ab)

    It seems I my mind knew that (a + 1)(b + 1) could be expanded to in 1 + 2ab + a + b, but somehow my mind didn't think to take away (1 + 2ab).

    anyhow, this is a quick example of how something like a + b can be worked around

    if you don't expand the equation you get

    t1 = inc(a)
    t2 = inc(b)

    t3 = a * b
    t3 = inc(t3)

    c = t1 * t2 - t3.

    which doesn't have a single addition operation.

    A a * b could be performed as a loop or using shift and adds, other things can be generalised or made specific to avoid a software patent, making patents nothing but a hindrance.

    This is probably why they don't allow you to patent software, DNA etc.. in Europe and why they were arguing that a 'technical' effect must be produced, I'm sure someone could have worked around LZH if they wanted to.

  20. Re:Discount? on Attempt to Apply Decency Standards to Cable/Satellite Television · · Score: 1

    I think l337 speek is ok too.

    An you'll always be able to get away with
    4q u pcsh8 unless you read things phonetically and 55378008 is ok, so long as you don't turn the monitor upside down and bais mois can openly be sold in UK shops, and because of last nights southpark it's ok to say shit.

    Now all I need is the penis bird to come back again, and my 0b****c@t#d profanities will be complete.

  21. Re:Why does everything has to be patented?? on Software Patents Could Stop EU Linux Development · · Score: 1

    and then the oil ran dry.

    I'm a wondering, what happens when the oil etc... run out, will there be a few families with all the worlds wealth the rule over the rest of us. (just like there was prior to industrialisation) Are the families setting them self's up as we speak.

  22. Re:"minus all the Hurd parts" on Stallman Calls For Action on Free BIOS · · Score: 1

    http://www.gnu.org/software/hurd/hurd.html#advanta ges

    it exists
    The Hurd is real software that works Right Now. It is not a research project or a proposal. You don't have to wait at all before you can start using and developing it.


    on mach

    Versions of Mach-based operating systems of this ilk were found in OSF/1, NeXTSTEP, and IBM's OS/2 for the RS/6000-based machines - all of which are no longer widely used. Other operating systems looked to migrate to this sort of system as well, including Apple's Pink, IBM's Workplace OS, and any number of others.

    Apple selected OPENSTEP to be the basis for the successor of the classic Mac OS. It became the Cocoa API of Mac OS X. OPENSTEP is in fact an upgraded version of NeXTSTEP, which used Mach 2.5. As such, OPENSTEP's Mach/BSD amalgam is the basis for Apple's Mac OS X operating system.


    Sorry, no Lego.

  23. Re:Hmmmm on Software Patents Could Stop EU Linux Development · · Score: 1

    So don't expand, where in the book did it say expand.

    t1 = inc(a)
    t2 = inc(b)

    t3 = a * b
    t3 = inc(t3)

    c = t1 * t2 - t3.

    There you go, no anything + anything (well unless you count inc as a + 1)

  24. Re:Hmmmm on Software Patents Could Stop EU Linux Development · · Score: 1

    1: the compiler should always reduce the equation.

    2: It was a quick example off the top of my head to show that you can always work around a algorithmic patent which is why they should never be granted with more complex examples a work around may only be a few hundred cycles in several thousand slower, and by the time you've implemented it moors law will have it executing at the same speed.

    To correct my example.

    I should have put
    c = (a + 1)(b + 1) - (2 + 2ab)
    which works without ever using a + b

  25. ...against someones will. on Software Patents Could Stop EU Linux Development · · Score: 1

    Sue me till I don't have a penny left, but there's nothing you can do to stop me violating a parent.

    All software patents can be avoided, here;s one example of the top of my head.

    company a patents
    c = a + b

    So I implement
    c = (a +1)(b +1) / 2 + ab

    bye bye patent.