Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×

Comment: Re:Dumb question (Score 1) 240

by AaronW (#49144389) Attached to: Study: Peanut Consumption In Infancy Helps Prevent Peanut Allergy

I had a friend who was deathly allergic to pepper. He had to keep an epipen with him at all times. His sister died from pepper. Even a waiter grinding pepper onto someone's plate nearby would cause a serious reaction. Every time we'd go out he would have to make sure that there was no pepper in whatever he ordered though invariably there were times there was. Pepper generally is not listed in ingredients as pepper but as "spice".

Comment: Re:Good grief... (Score 1) 676

by AaronW (#49114749) Attached to: Bill Nye Disses "Regular" Software Writers' Science Knowledge

Much of the knowledge can be applied to other architectures as well. I recall rewriting some pixel rotation code in order to optimize it for how the cache and memory actually work and saw a huge speed-up, over 400% by making memory accesses mostly linear instead of all over the place and adding some prefetching support. Basic things like that can make an enormous improvement in performance. Most programmers don't think about things like the CPU cache or registers or pipelining or how some operations are a lot more expensive than others (i.e. divide vs multiply).

Comment: Re:What's Unique To Goto? (Score 1) 677

by AaronW (#49053553) Attached to: Empirical Study On How C Devs Use Goto In Practice Says "Not Harmful"

At the time I don't think it did. Recursion has its place and can be a very elegant solution. Unfortunately most examples I see showing it are better off not using it. In the language we had to use it in it didn't work well, especially since the Pascal P compiler was absolute shit and I proved beyond a shadow of a doubt why it sucks since it ran so slowly with high stack usage compared to a simple loop.

Comment: Re:All it will take is (Score 1) 580

by AaronW (#49044485) Attached to: Low Vaccination Rates At Silicon Valley Daycare Facilities

I got chicken pox as a teenager and got it bad. I was out for several weeks and still have scars from it. I would gladly have had the vaccine if it had been available. I will also be the first to get a shingles vaccine when I get older.

People died from measles and got permanent brain damage and deafness from it. It's one of the most highly communicable diseases known to man. My grandfather suffered from the after effects of polio all his life. I think the problem is that these anti-vaxers have never seen and don't understand the damage these diseases have caused in the past, nor do they think about what their choices will do for children too young to be vaccinated or people with weak immune systems like my sister. It's especially bad when people who catch measles go to the doctor's office and expose everyone there, with a higher likelihood of exposing people least able to deal with it. I know people who take medication to suppress their immune systems and people with weakened immune systems.

I feel if someone who did not get the vaccine by choice infects someone else who can't get the vaccine or who has a compromised immune system then that person should be responsible for all of the medical costs. I also think the exemptions should go away unless there is a medical need for the exemption. My state is already proposing this which I think is a good thing.

Someone's right to not get a vaccine should not trump my sister's right to live (she has a compromised immune system) or a baby's life.

A friend of my father's who works at Intel is one of these anti-vaccine nuts. She believes in using Chinese herbal medicine and refuses to let her baby be vaccinated and nothing we say seems to convince her otherwise.

Comment: Re:What's Unique To Goto? (Score 2) 677

by AaronW (#49044161) Attached to: Empirical Study On How C Devs Use Goto In Practice Says "Not Harmful"

I was forced to take the introduction to programming class in college because the Turbo Pascal program I had used a goto for this very reason. In Pascal there was no break/continue equivalent and it would have been extremely messy in the code to not use the goto.

It later turned out that the professor did not know Pascal at all when there were simple errors in a 2 page program that she couldn't get to compile. I only showed up for the midterms and final for that useless class. The next one was worse since the professor disallowed using repeat/until, requiring recursion for everything claiming that it was just as fast since the compiler would take care of it (it wasn't, it was MUCH slower). Recursion does have it's place. Unfortunately most of the examples I see for it are places where it shouldn't be used.

Comment: Re:GOTO is a crutch for bad programmers (Score 1) 677

by AaronW (#49044137) Attached to: Empirical Study On How C Devs Use Goto In Practice Says "Not Harmful"

And that non-standard indentation will cause nothing but trouble, especially in a large project. The lack of proper indentation makes the code harder to read than just using a goto, especially if someone works on it in a modern editor that does things like handling indentation for you.

Comment: Re: GOTO is a crutch for bad programmers (Score 1) 677

by AaronW (#49044119) Attached to: Empirical Study On How C Devs Use Goto In Practice Says "Not Harmful"

Try using C++ in the Linux kernel or in a bootloader, the type of stuff I work on. Everything is C for a reason. That isn't to say that C++ can't be used at the kernel level since I worked on a large C++ OS/2 driver (around 100KLOC) years ago, but it took a lot of work to make C++ work in that case and it was extremely compiler dependent (I think it only worked with Watcom 10.0b, not rev c or any other version).

Comment: Re:why? (Score 1) 677

by AaronW (#49044029) Attached to: Empirical Study On How C Devs Use Goto In Practice Says "Not Harmful"

A goto certainly makes cleanup code a lot easier, especially in my line of work on bootloaders, device drivers and other stuff. There are many cases where it is far cleaner to use a goto error_handler; in the code, especially if there are multiple locations and have all of the cleanup code in one place rather than duplicating it all over the place.

There are other times when a goto can also make sense, for example if you have multiple nested levels of logic you want to get out of it in a hurry. It takes an experienced programmer to know when to use it and when not to. I have seen many cases where a single goto or using goto for error handling makes the flow of the code much easier to read and where it can significantly reduce the size of the code. That's not to say that it can't be abused either. I have also seen cases where it makes the code more difficult to read but in most cases where I come across it it simplifies the logic flow and helps keep the code from being cluttered.

FORTUNE'S FUN FACTS TO KNOW AND TELL: A firefly is not a fly, but a beetle.

Working...