Follow Slashdot stories on Twitter


Forgot your password?

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:Stupid is as stupid publishes.... (Score 1) 482

by Dr_Barnowl (#49337469) Attached to: No, It's Not Always Quicker To Do Things In Memory

It's such a common case that Java will usually optimize looped string concat into a StringBuilder now. I imagine Python does the same thing.

The performance probably still sucks because the buffer needs re-allocating periodically (in StringBuilder, it doubles each time), but not as much as it would in VB6 which has no such cleverness in it's immutable string type. There's also all the garbage collection overhead for all those discarded byte arrays.

Would be more interested to see a benchmark if they declared the StringBuilder with a buffer of the size they expected to use.

Comment: Stupid premise - apples and oranges (Score 1) 482

by Dr_Barnowl (#49336357) Attached to: No, It's Not Always Quicker To Do Things In Memory

They're only examining the performance of concatenating immutable strings, versus the performance of writing to a (buffered) stream.

This is a problem that's been known about for donkey's ages. It's just that computers are so stupidly powerful it's no longer an issue that many programmers ever have to confront.

In VB6 you had to jump through hoops to do it properly, but it's such a common case in Java that the compiler will optimize repeated concatenations in a loop into using a StringBuilder instead. I presume Python has similar optimizations.

I used to just stick all the strings in an array, allocate a new string of the appropriate length, and copy them into it.

News at 11 : many less experienced programmers are ignorant of the internal workings of their chosen frameworks, because they never had to write their own implementation at a lower level.

Comment: Re: Why are people bullying? (Score 2) 343

Weird that we disapprove of Nazis so much isn't it? Kinda like meta-bullying.

or - fuck off.

*Especially* today, where technology can magnify the effects of an individual so greatly, some population of individuals being different is essential to the progress of the species. If we're all the same, we're all doomed to die as the ocean displaces us inland and the biosphere is ruined by our over-exploitation.

It's a genuine mechanism, but one that evolved to serve the selfish gene. The problem is that your fate (and the fate of your genes) no longer depends on your local tribe, but on the greater race of humanity. It's highly likely (whoever you are) that the solutions to our 21st century problems are not going to emerge solely from you and your immediate geneology, or from folks that think like you, dress like you, etc. So it's now become a retrogressive, anti-survival behaviour.

I'd humbly suggest that you go remove yourself from the gene pool... if that wasn't an example of the very behaviour we must overcome. I hope someone changes your mind and you find peace in this world of increasing diversity.

Comment: Re:I guess she got tired of blaming weed... (Score 4, Insightful) 343

Physical violence as a behavioral teaching mechanism is both lazy and bad parenting.

If you use it frequently I agree.

I've had to use it precisely once. It's fine for establishing a baseline in young children, because they don't accept abstract arguments. If they ever question another punishment regime like the naughty step, that's where you have to go - you'll have to deploy some sort of violence, even if it's physically restraining them so they stay put on the naughty step.

Consistency is key. If you arbitrarily deal out physical violence you'll find your kids doing it too. If you make it the ultimate sanction, you'll rarely have to use it.

I suspect most of the problems with the use of violence are not with it's use as a discipline, but as an emotional outlet for the frustration of the parent.

Comment: Re:Light levels, not computer games (Score 1) 143

by Dr_Barnowl (#49308357) Attached to: Excess Time Indoors May Explain Rising Myopia Rates

Internal lighting is so much dimmer than light outside that this is probably not practical.

The eye is very accomodating and will adapt to great extremes of light.

This is credible as a mechanism. Optical acuity is improved by having a smaller pupil (this is why squinting to improve your vision is a thing - you're sacrificing light collection to reduce the number of stray unfocussed lightpaths entering your pupil). Therefore if you don't get enough light, your iris muscles will atrophy making your pupil wider.

If your lenses function perfectly this is of no consequence, but if you have imperfect lenses wider pupils will make your vision worse.

Comment: Re:sOrRy ChArLiE WrOnG tUnA (Score 4, Insightful) 143

by Dr_Barnowl (#49308329) Attached to: Excess Time Indoors May Explain Rising Myopia Rates

It's you who is the dumbass. Perhaps you should actually think about it, or research it, before calling people out.

This is school level physics.

The mirror doesn't emit light, it reflects it. Which means the light has the same path as before, just bounced into a different angle, convergence and everything.

Try this simple experiment - hold a mirror close by so as to reflect a tree in the distance. Hold a page of text (or a glistening penis, I suppose) next to the mirror. Focus on the text. Now focus on the tree.

Can't do both at the same time, can you?

Comment: Preventative Glasses (Score 3, Insightful) 143

by Dr_Barnowl (#49308209) Attached to: Excess Time Indoors May Explain Rising Myopia Rates

I started noticing this when I was revising for A-Levels. (17-18)

My distance vision would start to fuzz after hours on the books, and be restored by a long walk.

It's pretty much done the same thing ever since.

One thing I do is make sure to focus on distant objects while looking out of the window a few times an hour.

The other thing that helps is wearing +1D reading glasses (just cheap ones from the supermarket). These are designed for oldies who can't focus on close objects anymore - so they move the focal point of close up material much further away. A foot or two away, my monitor is basicaly at infinity, which stops/reverses the atrophy of my distance vision.

Focussing is mediate by muscles! Like any others, use them, or lose them.

Comment: Godaddy are thieving wankers dot com (Score 5, Interesting) 70

by Dr_Barnowl (#49305623) Attached to: GoDaddy Accounts Vulnerable To Social Engineering (and Photoshop)

... is the name of a domain name I searched for on their site to see if they'd bite.

A few years ago I thought I'd buy a domain for myself. Went and searched for it on their site. NEVER DO THIS.

It wasn't taken.

I ummed and aahed and slept on it.

I came back. It was taken. By Domains By Proxy LLC. Who are owned by GoDaddy.

It seems to have been sold on to another speculator, unless Afternic are them too. (I just checked. Afternic were bought out by GoDaddy in 2013).

I own the variant of it now. I used GANDI, who by all accounts, are not wankers.

So, if you want a domain, be prepared to buy it on the spot if it's available. And use a registrar who aren't arseholes.

Comment: Re:OEMs should prepare for rage (Score 5, Insightful) 362

by Dr_Barnowl (#49305537) Attached to: OEMs Allowed To Lock Secure Boot In Windows 10 Computers

SecureBoot is a reasonable thing. It's when it's under the control of Microsoft, rather than the owner of the hardware, that it becomes a problem.

Make sure the OS is composed of files that are cryptographically signed and entirely legit? Fine.

Define "legit" as being "only those things signed with Microsoft keys"? Not so fine.

The current solution of a Linux bootloader signed by Microsoft is a stupid, half-baked compromise. I wouldn't have settled for it - nothing less than the ability to load my own signing keys into the BIOS being mandatory for all SecureBoot installations. And of course, disabling it.

I never cheated an honest man, only rascals. They wanted something for nothing. I gave them nothing for something. -- Joseph "Yellow Kid" Weil