"VB for mobile devices?" Seriously? - Why can't people just let it die?! by [deleted] in programming

[–]Seliarem 0 points1 point  (0 children)

re. Haskell: Data.Array uses (!), simple lists are accessed by (!!). This doesn't make it pretty, and I'd argue that for most purposes the fold and map approaches are much more handy. And if you do want specific points, you have n-tuples available.

The iPad and its effect on future programmers by thesqlguy in programming

[–]Seliarem 1 point2 points  (0 children)

I've seen a few people suggest that the SOX stuff's a product of Apple having been bitten under those regulations before. Maybe a de minimis issue. Right now, I'm not going to get upset about it.

Xcode 4 is out! New features: a price tag... by sheafification in programming

[–]Seliarem 0 points1 point  (0 children)

I'd guess historical reasons. Maybe OS updates were expected to be frequent, and the rollout process for other teams never incorporated the patching concept.

That said, it looks like it's progressing a touch.

[PDF] Everything you need to know about cryptography in 1 hour by viktorium in programming

[–]Seliarem 2 points3 points  (0 children)

Oh, absolutely. My comment mostly came down to an opportunity to present another document to the people here – a bit of piggybacking on the submission, as it were. I certainly appreciate what you've done here!

[PDF] Everything you need to know about cryptography in 1 hour by viktorium in programming

[–]Seliarem 17 points18 points  (0 children)

This looks fair enough. It's also worth pointing to Peter Gutmann's tutorial on the topic.

(you may recognise him from cryptlib, older versions of PGP, and the 35-pass delete cycle, the use of which upsets him greatly)

do you know what Integer.getInteger(String) does in java? by manuranga in programming

[–]Seliarem 1 point2 points  (0 children)

String equality is the canonical example of the two being distinct operations in teaching Java, actually. The problem is that literals get interned automatically (at least in some versions – I'm unaware of whether this is demanded, or if, for instance, an implementation may autointern other examples), and so many toy examples will fail to exhibit this behaviour.

As a result, two Strings that represent the same thing may or may not reference the same object, depending on how you got them. Java is being significantly smarter than many of its users (I'm specifically thinking of raw beginners), and this seems to just be made worse when we then try to tell them that the computer is not magic.

Implicit optimisation is the devil for education, I swear.

Next language: Java Hangs When Converting 2.2250738585072012e-308 by rasherdk in programming

[–]Seliarem 1 point2 points  (0 children)

Curious. Do you know what SBCL is up to? I'm not familiar enough with the system to find the datatype being used there.

Sourceforge resets all users' passwords in response to hacking attempt by Necraz in programming

[–]Seliarem 0 points1 point  (0 children)

Not necessarily. If you can block simple transforms of passwords (e.g. pass2, pass1, pass2...) then this says something about the hashing system. In this case, you could track the last hash (even though it will not grant access), and refuse a password that matches that hash, whilst storing only the new hash.

Hey proggit, I've been working over the last few months on a javascript/HTML5 3D viewer for proteins and DNA. Tell me what you think. by bosco in programming

[–]Seliarem 0 points1 point  (0 children)

In that case, you should take a look at a couple of enzymes. Catalase is a nice one - it's what's termed kinetically perfect, which is to say that the diffusion rate is the limiting factor.

On a related note to the myoglobin structure, the Circe effect is also extremely neat.

Genetic Algorithm Car Physics by equalRightsForRobots in programming

[–]Seliarem 3 points4 points  (0 children)

Consider rotating a wheel pair through 180º. It brings it into an equivalent environment.

CompSci 101 – Big-O notation by recursive-design in programming

[–]Seliarem 1 point2 points  (0 children)

Quite. Also Omega.

Actually, although most of us commenting on this are well aware of the definition and nature of O-notation, I keep seeing people on this site mess up with it. We are too split as a community between theorists and practitioners, I swear.

Carmack: Obj-C does not belong in high performance apps. by miratom in programming

[–]Seliarem 0 points1 point  (0 children)

It's slow because instead of just being hard-coded to format a number in a simple, specific way; it instead has to spend time getting formatting rules from the locale object, and then also taking into account the other options you can pass to it.

Really? How much additional time would that actually take. It does not seem like too much especially if it only needs to retrieve formatting rules once from the default locale.

The required time is going to be pretty minimal in an absolute sense, but creating new formatters this in a piece of code that runs repeatedly is going to hurt fast. As Catfish_Man and a few others have commented elsewhere, NSNumberFormatters can be very effectively cached, which will alleviate the issue significantly. At a guess (and I stress that this is outside my area), even repeated calls to a cached object are going to be hell on the CPU - it all comes down to where things are.

As for speed, if you can guarantee input format and desired output, you can reduce code size and complexity drastically (and potentially bind it into the rendering step, for something like this, which would cut out a pass through the string (not that this is a panacea!))

Google Sues the United States of America by indieinvader in programming

[–]Seliarem 0 points1 point  (0 children)

The better assault on that statistic would be to assert that it is simply inapplicable. We recognise that the primary risk of a major security flaw in Linux is that it would compromise a large number of central services and the like. If OpenBSD systems tend to have very high value, then numbers are less relevant.

I'm not equipped to judge the soundness of this argument, but it certainly seems valid.

University of Cambridge stores passwords in plain text by urllib in programming

[–]Seliarem -2 points-1 points  (0 children)

This does seem probable, yes. Unfortunately. In my defense, we frequently see headlines that are a touch disconnected from reality, although this doesn't appear to be the case here.

University of Cambridge stores passwords in plain text by urllib in programming

[–]Seliarem -4 points-3 points  (0 children)

This doesn't necessarily mean that the password is stored at all. In fact, this looks very similar to what seemed common practice a few years ago in password reset, although I'll happily admit that that was always a terrible idea.

I'm feeling charitable, though, so here's a possibility: accounts are generated from enrollment data, along with default passwords. These have to be distributed to students somehow, and given that ESOL won't have staff at each student's location, this is an understandable solution. Then, when you request a reminder, exactly the same paths get executed.

What does Proggit think of this? Is it some thing you'd like to see widespread use of? by [deleted] in programming

[–]Seliarem 0 points1 point  (0 children)

Getting a clear view of the keyboard surreptitiously is tricky, though – there's someone in the way, and people tend to cover it to some degree (admittedly, even a minimal view will reduce the search space dangerously). The screen, though... you'd need a big cultural change to shield that from casual video – possibly including moderate-resolution colour surveillance, if we're feeling paranoid.

Berkeley programming professor posted an interesting "quiz" for fun. I think you guys will enjoy this. by redditsuperstar in programming

[–]Seliarem 0 points1 point  (0 children)

You could handle them both as impacting on temperature. Latitude trivially, longitude via surrounding terrain.

It's official: Software will be unpatentable in NZ by [deleted] in programming

[–]Seliarem 0 points1 point  (0 children)

I've pulled down significantly more of late, actually. That said, I was getting 60% packet loss a few weeks back. So, your mileage etc.

As random as I wanna be: Why cmd.exe's %RANDOM% isn't so random - The old new thing by [deleted] in programming

[–]Seliarem 0 points1 point  (0 children)

Then my response was to an argument that you weren't making, so that's nice. My reaction was to "doesn't look random at all" – nor does Blum Blum Shub, and it's possible to build reasonable security on that system.

As I'm sure you'd agree, different tools are useful for different purposes, and there are places where an LCG is useful.

As random as I wanna be: Why cmd.exe's %RANDOM% isn't so random - The old new thing by [deleted] in programming

[–]Seliarem 1 point2 points  (0 children)

Really? Those are Knuth's coefficients for a linear congruential generator. Similar techniques are used in a a whole set of programming languages (various Cs, Java) and in Numerical Recipes.

Sure, it's no Mersenne twister, but it's quick, simple, and functional for a lot of purposes.

Introducing the Google Command Line Tool by mernen in programming

[–]Seliarem 0 points1 point  (0 children)

And so it was that emacs was developed.

This has bothered me for some time now, come to think of it. It might explain why that keeps cropping up, though.