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".
Slashdot videos: Now with more Slashdot!
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).
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).
My employer is not a fortune 500 company and we just got a notice from IT that none of the corporate Lenovo laptops are affected and only consumer laptops are affected. This is most likely due to the fact that corporate laptops tend to not have all the usual consumer bloatware installed.
It was sunny and around 80 degrees today with sun for the foreseeable forecast. I'd love to have some nice rain in there, during the week of course with nice sunny weekends.
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.
Meanwhile where I live January is usually the wettest month of the year. We got no rain last month and this month is looking quite dry as well, this after dealing with extreme drought. It's looking like 2015 won't be much better than 2014 for California.
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.
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.
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.
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).
Try 80 columns using the Linux kernel coding convention using 8-character tabs for indentation. The code grows unreadable quite fast.
It also adds another useless level of indentation which can be a problem making the code difficult to read, especially in projects which follow the Linux kernel coding convention.
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.
Indenting the flow can get bad if it starts to get rather deep. In my case, the code bases I work on use 8-character tabs for indenting and also limit the code to 80 columns. It quickly grows difficult to read and maintain if you have to keep indenting when a simple goto error_handler is far easier to deal with and I have found less error prone and easier to read. The flow remains easy to read since the error handler is always at the end of the function.
And that gets rather ugly if you have things inside loops and more complicated logic. It becomes far cleaner to just say:
break doesn't work so well when you have multiple levels of loops or other complex logic.