Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 internet speed test! ×

Comment Catherine the Great's Mathematician? (Score 3, Insightful) 133

Do we really need to invoke Catherine the Great's name to help explain who Leonhard "one-of-the-greatest-mathematician's-of-all-time" Euler was? For me it would be more like "Catherine the Great, a sponsor of the legendary Euler, also happened to do some notable things while leading Russia".

Comment Re:Obligatory XKCD (Score 4, Informative) 498

It's worth pointing out that XKCD's pretense that four random words are easy to memorize was based on them choosing four easy to memorize words. If I just have /usr/share/dict/words pull up random words for me, here's the first five passwords it comes up with:

It's a good thing that XKCD's Munro doesn't choose four random words from /usr/share/dict/words then, isn't it? The cartoon shows 11 bits of entropy associated with each word. That means a dictionary size of 2^11: about 2000 words. (In contrast, a typical /words file might have a hundred thousand entries. That's fifty-fold larger, so you get about 5.5 extra bits per word, but would indeed lead to the utterly useless output you've shown.)

The General Service List contains the top 2000ish most-often used words in the English language. I used the version compiled in 1995 and found here, mostly because it was the first version I could grab online. Pulling random words from the first 2000 entries, the four words I got (on my first three passes) were:
competition behave exact toward
experiment miserable there lord
spare page circle rabbit

Right out of the box, it's not what I would call a disaster, though a few of the words are a bit cumbersome, length-wise. (For reference, your /usr/share/dict/words selection only contains one word - "weave" - from the GSL.) If you started from, say, the top 5000 words, you could probably cut it down to a 2000-word list where every entry was non-obscure, had between 4 and 8 letters (the average word in the GSL has a length of 5.8 letters), avoided difficult-to-spell words, and eliminated similar-sounding words.

Comment Re:I could not agree more (Score 1) 1001

Not inserting - insertion sort. Reading more about this insertion sort and bubble sort would perform exactly the same on an already sorted list; they'd basically be doing the exact same thing. On a list that is nearly sorted, insertion sort tends to do better as well. See the Performance section on the Wikipedia entry to bubble sort for details.

Comment Re:I could not agree more (Score 1) 1001

No moves in memory happen with either bubble or insertion sort. The difference is the number of comparisons, which also count towards N. With bubble sort on a sorted list the numbers of comparisons, and thus steps, are O(N^2). With insertion sort for the same list the comparisons (also without moves) are O(N).

Comment Re:Interesting story (Score 4, Informative) 553

No commercial airline flight is 24 hours. There used to be a 19 hour one for a Singapore to New York flight but that's no longer in service.

The Mashable report quoted in the Slashdot summary uses a slightly different phrasing from the original LinkedIn report. The LinkedIn article actually says "after having spent 24 hours cramped in an economy seat on Qatar Airways".

Poking around a bit on Kayak, I see a bunch of Qatar Airways itineraries from Lagos, Nigeria (LOS) to JFK that involve three segments, with stops in Doha, Qatar (DOH) and western Europe (CDG, FCO, MAN, etc.). Total travel time is 27 or 28 hours, with nominal times in flight adding up to about 23 hours. Add an hour in a holding pattern somewhere (or queued up for takeoff on a taxiway, or waiting for a gate to open up), and the poor guy could easily have spent 24 hours in an economy-class seat on his way to JFK. Yeah, the phrasing's a bit sneaky since he would have had a couple of short "intermissions" to stretch his legs...but still, if we figure he arrived at LOS two hours before his flight, he would have been stuck in the international air transport system for better (worse?) than thirty hours all told.

Comment Re:I could not agree more (Score 1) 1001

Sorry, but I still don't see how this would be faster than insertion sort in this case. With bubble sort you first go through all n elements to bubble up the largest of them. If it's sorted you go through them all and nothing is moved. Then do the same for n-1 elements, then n-2, etc. until you're done.

With insertion sort you insert the 2nd element into a list of 1. It's already sorted, so nothing happens. Move to the 3rd element to insert into the list of 2. 2nd element is already less than 3 so, again, nothing to do. And so on until you do nothing starting at the nth element. Bubble sort version has n^2 steps (times some constant) when it's already sorted. Insertion has just n times constant.

Comment Re:I could not agree more (Score 1) 1001

Sorting something that has been sorted previously and is most likely still sorted? Best choice.

Errrr... no. Insertion sort would kill it in this case. The only case I've heard of where bubble sort is preferrable would be when random access to sorting elements is an issue.

Comment Re:I could not agree more (Score 2) 1001

But bubble sort is a horrendous sorting algorithm with no practical applications. You do not, under any circumstances, need to know it. Seriously, a first-timer making up their own sorting algorithm tends to rediscover selection sort, and that's better than bubble sort.

Comment Re:Let's go even further! (Score 1) 181

No upper management. And no board. Now that is a scary thought. How would companies run without people in charge? We need someone there don't we?

Well, the Swedish approach was to look at the individual job responsibilities of the CEO, and determine if all of those functions could readily be absorbed by other people or bodies within the company (where they weren't already overlapping - and sometimes conflicting - anyway). So if you want to go ahead and do the systematic hard work, there's nothing that prevents you from figuring out which positions could (or should) be eliminated, with their responsibilities reallocated to other staff.

Of course, it's waaaaay easier to just go the observational humor route and declare "Hey, everything is so much better in the office when the boss is away, amiright? Let's get rid of 'em all!" So, kudos for that contribution.

More seriously, I see a couple of obvious gaps that you would need to fill, right off the top. For one, you need to develop some mechanism for larger-scale strategic direction. In the Swedish company discussed, that role was filled by the company's board of directors. For another, you need to have some sort of framework for handling civil and criminal liability issues when someone eventually screws up. Where does the buck stop, ethically and legally?

Comment Re:Am I the only one? (Score 1) 139

It is possible to get news from multiple sources. BBC. Jerusalem Post. Al Jazeera. RT. And others.

But aren't they all biased? Yes, they are. Just like CNN, MSNBC or FoxNews.

Well CNN, MSNBC and Fox News are (apart from their biases) pretty light-weight, sensationalized sources of news. (And really, MSNBC and Fox News are the ones that are unapologetically biased).

BBC is good, Al Jazeera can be good, though I've seen some sesationalized stuff from them as well. RT is just Russia's propaganda network. Utter crap.

Comment Re:Free Motorcycles (Score 1) 295

Like I said, one can fiddle with the numbers to swing the accounting a fair bit in one direction or the other. As you've demonstrated, if one makes optimistic assumptions about the age of the donor and maximizes the number of recipients by assuming a strict one-organ-per recipient (include just one lung at a time, and no multiple-organ transplants--bear in mind that the vast majority of pancreas transplants are actually pancreas-kidney, for example) and 100% organ recovery and transplantation, one can choose to make the math give you the result you're looking for.

It's very sticky if you want to score tissues that aren't necessarily lifesaving or for which artificial or animal alternative sources exist. (It's ethically problematic to suggest, for example, that more dead motorcyclists are a good thing because it will improve the supply of cadaveric ACL replacements, especially given that many patients could instead receive an autograft of their own tissue.)

It doesn't help that you're neglecting the last and most important part of my comment acknowledging that a very substantial fraction of potential organs won't be converted into actual transplants: helmetless motorcyclists who die too far from care or too quickly for their organs to be recovered; ones who have communicable diseases, malignancies, or other medical conditions that exclude them from donation; and so forth. (Going forward, helmet laws will only be suspended if you're over 40, free of hepatitis and HIV infection, have recently been screened for cancer, and are biking in an area with excellent ambulance service within 1 hour of a major transplant center. Hmmm...) Each dead motorcyclist is only "worth" 60 years multiplied by the fraction of viable organ recoveries--which probably comes out to well under 50%.

Finally, we're using "accounting" in a couple of different ways, here. I was using it purely to refer to life-years saved or lost. If we actually want to look at dollars and cents, it gets really ugly really fast. In the United States, the total billable costs for a heart transplant (including 30 days of pre-operative screening and prep, organ procurement, the transplant operation itself, and the subsequent 6-month period of recovery and rehab) comes out to about a million bucks. A single lung or a liver transplant are both well over half a million apiece. Kidneys are well clear of the quarter million mark.

From a purely financial perspective, it's waaaaay less costly to just let the motorcyclist survive and the potential transplant recipients die in a few months or a year, rather than let them be brutally expensive surgeries with steep and ongoing maintenance costs. Amortizing that heart transplant over the likely life of the recipient (or the transplanted organ) runs a hundred grand plus per year. Oh, and don't forget the cost of care and rehab for all those brain-damaged motorcyclists who don't manage to actually die from their head injuries....

Slashdot Top Deals

Anyone who imagines that all fruits ripen at the same time as the strawberries, knows nothing about grapes. -- Philippus Paracelsus

Working...