Slashdot Mirror


User: gnasher719

gnasher719's activity in the archive.

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

Comments · 5,926

  1. 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.

    I think I might the implicit assumption that you wouldn't implement it like a complete idiot, but that you would stop once it's sorted. Seems that assumption was wrong.

  2. 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.

    Actually, Bubblesort can be the best sorting algorithm, if you have an array that was sorted, but the sort key has changed _slightly_ so everything is _near_ its correct place. Let's say you have 1000 shares sorted by yesterday's share price, and you want to sort them by today's share price.

  3. Perhaps that was the real test - an evaluation of your dedication.

    My dedication is directly proportional to my pay. Pay me say 400 pound a day, and I'll do all the quizzes that you want me to do for the next year.

  4. We give potential applicants a take home programming problem and ask them to send us the result a couple of days later. We then quiz them on their work to make sure they did not get someone else to do it.

    So how much do you pay me for that work?

  5. Even worse, a lot of candidates don't even know what a bubble sort is, or that there's such a thing as a bubble sort. They don't understand that there's more than one way of sorting a list, or that some ways are more efficient than others. They don't realize that the best method in one case could be different from the best method in another. They don't realize that some methods scale better than others with list size, or that some are faster if the input list is partially sorted, or that some require extra memory and others don't, or that some can be parallelized better than others.

    A very interesting observation. My observation using Apple supplied frameworks for MacOS X and iOS development is that they just use the fastest possible way to sort an array, and that's it. No need to know the second fastest. There are other things that the developer should worry about. There's nothing wrong with writing

    array.sort(
    BTW. If you try to sort an array with reference counted pointers to objects, with code that you wrote yourself, most of the time will be spent pointlessly adjusting reference counts - a sorting method written at a lower level can know that the result is just a permutation of the original array, so there's no point adjusting any reference counts.

  6. Re: The long, slow downfall has begun on A New Video Shows Uber CEO Travis Kalanick Arguing With a Driver Over Fares (bloomberg.com) · · Score: 1

    they decline to take action because your boss is a "high performer" and it is his "first offense".

    And then you find out that there have been many complaints before yours, and many complaints after yours, and every time it was his "first offense", meaning HR was lying to you.

  7. If they are making three new phones, that will be one model, right? Or one each of three models?

  8. Re:And? on Al Gore Sells $29.5 Million In Apple Stock (appleinsider.com) · · Score: 1

    Technically, you don't *need* $400K to exercise the stock options.

    What you usually do is you exercise your options, but you sell the exact amount that you need so that the sale covers the exercise cost and capital gains tax. You won't have to pay capital gains tax for the shares that you exercised but didn't sell.

  9. What idiot wrote this article? on Al Gore Sells $29.5 Million In Apple Stock (appleinsider.com) · · Score: 2

    So al Gore sold lots of Apple shares. Someone wanted to appear smart and wrote "sold 215,437 shares of Apple stock (APPL)"

    Apparently that idiot isn't aware that APPL is a long defunct oil company that hasn't traded for many years. Apple's stock symbol is AAPL.

  10. Re:Costing to the RIAA vrs Ignoring? on Google Says Almost Every Recent 'Trusted' DMCA Notices Were Bogus (torrentfreak.com) · · Score: 1

    Well, the copyright holder first has to determine whether the content is actually infr-- (snicker, choke, guffaw)

    No, the copyright owner has to check that the content would be infringing if it was the content that they think it is. For example if there are two songs with the same title, and you own the rights to one of them, it is not illegal to send a notice for a song with that title - as long as you own the one that you think it is, even if you're wrong.

  11. The reason for compulsory 3rd party liability insurance is to make sure that victims will _always_ be compensated. The two exceptions mentioned (not paying if the owner modifies the car, not paying if the owner doesn't install required updates) open a gap here, where an innocent bystander can get badly injured without compensation. That's not tech savvy, that is idiotic.

    Obviously if these two exceptions happen, then the car is not safe, so the police should be able to scrap the car, and if an accident happens, then the insurance company should pay and take the last penny off the owner, and then the police should scrap the car and throw them into jail. As they should do with anyone driving without insurance.

  12. They might be safer than kids, but they're still on a bunch of medications on which they really shouldn't be driving. And in a crisis, their reflexes are typically awful, often for the same reason.

    Crisis? What crisis?

    That's a huge benefit of being an experienced driver - you smell trouble far before it happens. You know which drivers are going to do something stupid, and you stay out of their way. You leave others room to make mistakes and recover from it.

    A good driver will avoid many situations where good reflexes would be needed, In addition, a good driver will make sure they have enough space to not act by blind reflex, but by thinking. Your "fast reflexes" will quite often just make the situation worse or will cause different problems.

  13. And the next line: Insurance company refuses to cover damages, clean-up costs, hospital bills, loss of income due to disability and so on. Even if you do eventually win expect to spend a few years in court with a lawyer driving you into bankruptcy first. Also if you're arrested you have the right to a lawyer, not so much in civil court when the insurance company claims you broke the terms, I'm sure they have something in the wall of legalese that will apply.

    I don't know the US laws; in Germany your third party liability has to pay if the car was insured, and the damage wasn't caused intentionally. (And your car is almost always insured, even if you didn't pay your fees; if the insurance company decides to cancel your insurance, they will send a letter to you, and another to the police to seize your car until you insure it again).

    That has always covered accidents caused by drunk drivers, by thieves and so on. Because third party liability is a legal requirement set by the government to protect innocent third parties, so it must be very hard to avoid.

    If the USA has similar rules, then third parties should be covered. What happens to the owner of the car, that's a different matter. Everyone from police to insurance company will try their best to make their life very, very unhappy.

  14. Good move, difficult marketing on Samsung To Sell Refurbished Galaxy Note 7 With a Smaller Battery, Says Report (androidauthority.com) · · Score: 1

    Facts are: There was nothing wrong with the phones themselves, except the batteries. Samsung first had the problem that some batteries were physically larger than they should have been, which _will_ cause problems. Then they had a second problem, that in order to fix the first problem, they rushed other suppliers to deliver high capacity batteries before they were properly designed. Lots of the damage to the brand was caused by the fact that they first had a problem, said it was fixed, and then had the exact same problem again because they rushed for a solution.

    It seems that trying to fit in that extra high capacity (3,500mAh) was difficult. Too difficult, it turns out. Same battery with lower capacity (3,000mAh) should be much easier to build without any safety problems. I'm personally not in the market for a Samsung phone, but if let's say Apple offered "iPhone 7 with 2 hours less battery for $300 less", I'd be quite interested.

    Anyone who wants to buy Android, I'd recommend looking at the price, and checking what you get for it. If it's better than another phone for the same price apart from lower battery life, you just decide what you want more (features, speed etc. vs. battery life) and buy it or don't. Emotionally, the brand is damaged. Rationally, I would think that these phones will be absolutely fine.

  15. Re:Why trust in the media is at an all time low on PewDiePie Calls Out the 'Old-School Media' For Spiteful Dishonesty · · Score: 1

    The left wing are critical of Farage's views on the NHS, but never bring up his support of drug decriminilisation.

    You mentioned him first. Nobody gives a shit about Farage's view on anything. What people give a shit about that frogface had his manic idea of leaving the EU, and did everything he could to achieve it. Admitting himself that all he wanted was to leave, and he himself doesn't give a shit about what happens afterwards, and what the consequences are.

    All the time he was spreading lies about 350 million pound a week that were going to the NHS, about the UK being invaded by Turkish muslims.

    He's being paid £85,000 for a job where he never turns up for work as an MEP. Then he kissed Trump's ass to get himself a better paying job as ambassodor to the US. Embarrassing. Now for the first time the UK government has a list "people who can never, ever become ambassador" with Farage being the only one on the list.

  16. Re:Professional attention whore strikes again on PewDiePie Calls Out the 'Old-School Media' For Spiteful Dishonesty · · Score: 1

    For some reason, the meat of the story, that main steam media are being so dishonest, seems to be ignored by many commenters here.

    That's because it's totally unimportant if some unimportant unfunny punk makes a little bit less money. It is absolutely important to remind people that vile racism is unacceptable.

    What's more important: A million dollar less in the pockets of this little punk, or a jew dead because some asshat saw "daath to all jews" and took it serious?

  17. Re:Not about the free market on PewDiePie Calls Out the 'Old-School Media' For Spiteful Dishonesty · · Score: 1

    Well, so you say. But others watch the video, and his other videos, and conclude that he is a bigot and that this video is an attempt to push out bigotry under the cover of humour.

    That's not the problem. The problem is that plenty of idiots think "he says here on his highly successful wesite that all jews should be killed, so maybe there is something to that idea".

  18. Re:Death To All Jews on PewDiePie Calls Out the 'Old-School Media' For Spiteful Dishonesty · · Score: 1

    ... and by the way, Israel has been building the same wall that snowflakes are worried about on the mexican border,

    Just to avoid confusion: It is the biggest snowflake of all, Donald Trump, who wants to build a wall.

  19. Re:the real reason theyre arguing it. on Apple Will Fight 'Right To Repair' Legislation (vice.com) · · Score: 1

    Apple could make an easy to repair phone like other companies, but where's the profit in that? How will they sell the next version if old phones keep working for years on end and there aren't any significant improvements.

    Please tell me about other companies that make phones that are easy to repair. And fact is, old iPhones _do_ keep working for years on end. I have an iPhone 3GS and an iPhone 4 that are working just fine, including the battery, after I don't know how many years.

    And Apple iPhones are very easy to repair - you take them to the nearest Apple Store, and they repair them. Not always cheap, but a lot cheaper than a new phone.

  20. Re:the real reason theyre arguing it. on Apple Will Fight 'Right To Repair' Legislation (vice.com) · · Score: 1

    After the warranty, Apple wants only authorized shops to be able to repair, and the repair consists mostly of replacing entire boards, oh, and yeah, data on the device is not retained in the Apple-blessed process.

    You are posting on Slashdot. If you don't have a backup quit posting here. I replaced Apple devices several times (sometimes out-of-warranty repair, sometimes because someone wanted a better phone), and the process was turn on - enter your Apple ID - wait a few minutes until your data is restored, and a few more minutes until all your apps are downloaded again.

  21. Re:Ban iPhone from planes on Apple Will Fight 'Right To Repair' Legislation (vice.com) · · Score: 1

    Apple has clearly announced that their product is dangerous, so the TSA should ban them.

    I hope a legislator at one of these state legislators makes this point if an Apple employee is stupid enough to raise this.

    Apparently they are perfectly safe unless they get into the hands of a moron who thinks he can make a repair that he can't make safely. So I'd say let them on board, but arrest anyone who tries to get on board with a self-repaired phone.

  22. Re:the real reason theyre arguing it. on Apple Will Fight 'Right To Repair' Legislation (vice.com) · · Score: 1

    That's pretty much what I understood from the summary. Apple products are so insecure that they cannot be repaired without presenting a hazard, maybe we should remove them from circulation.

    What I understood was that there are morons that couldn't repair an iPhone without creating a hazard, and Apple wants to remove those morons from circulations.

    There was one case where an iPhone went up in flames on an airplane, and it turned out that same idiot had tried to make a repair and put two screws in that damaged the battery.

    For battery replacements, your chances that you get an original Apple battery (or one made in the same factory and undergoing the same quality checks) are zero, even if you buy an "original Apple battery" anywhere but from Apple. Your chances that you get a battery that is safe to use are probably fifty-fifty.

  23. Re:Trump doesn't run borders on US-Born NASA Scientist Detained At The Border Until He Unlocked His Phone (theverge.com) · · Score: 1, Insightful

    The Ninth Circus arrogated a power they do not have.

    Many people disagree with you. Most important, the right-wing judge whom Trump wants to add to the Supreme Court of the USA disagrees with you. In public. If _that_ man says that a court is right and Trump is wrong then you can believe it. (Like when _the NSA_ says that backdoors in phone encryption is bad for national security, then you can believe it).

  24. Re:Factory reset before you get off the plane. on US-Born NASA Scientist Detained At The Border Until He Unlocked His Phone (theverge.com) · · Score: 1

    Additionally, the "Border Zone" in which CPB operates is within a hundred miles of the US border including coastlines. This means cities like Pittsburgh, Fort Wayne, Sacramento and Portland are "border cities". Two thirds of Americans live where they can be stopped and searched by CPB. The ACLU has a convenient map [aclu.org] of the "border zone" on their website.

    Don't tell Theresa May, or she will declare all of the United Kingdom to be "Border Zone".

  25. Objective-C++ ??? on GitHub Commits Reveal The Top 'Weekend Programming' Languages (medium.com) · · Score: 1

    That's interesting. The only practical use for Objective-C++ is to write wrappers for C++ classes to be used from Objective-C code or vice versa. So people are writing wrappers for either their C++ code or their Objective-C code on the weekends?