Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×

Comment Re:making a big splash with bad science (Score 1) 205

We wonder why so many Americans are ignorant of the standards of science when the only time anything scientific captures their attention, it's complete bullshit wrapped around an intriguing nugget. Selling the bullshit sizzle but not the steak is the reason the majority of the population remains clueless about this important food group.

Beautifully phrased.

Comment Re:Kodak vs Instagram? Really? (Score 1) 754

I would fully expect to be working for the company that's building the software development machines, mostly since that's what I already do.

I do take your point, but the problem is that there are lots of people with non-transferable skills because they're not really skills. That's generally not true in any field that actually requires an education. (And no, business school and anthropology do not count as an education.)

Comment Re:Kodak vs Instagram? Really? (Score 4, Interesting) 754

I highly doubt displaced, former foundry workers, who spent the last 30 years mastering the art of steel production, would give a flying fuck that Samsung opened a new facility where they used to work and is now hiring software engineers.

Amusingly, I used to work in a foundry and I'm currently a software developer. (Employer keeps trying to call me an engineer, but I call it alchemy.)

I think you over estimate the time or skill required to master steel production. You could have a high-schooler trained to do it inside a year.

Such a shame that the American people allow the university (and medical) systems to hold them hostage instead of allowing the whole country to move into the 20th century.

Comment Re:Regular Expressions (Score 1) 598

This means that it only is useful if you can solve the problem faster by writing it with regular expressions than you can with whatever language you are using it form.

In my experience there is something close to a 10/1 ratio between gratuitous pointless uses of regular expressions and effective useful ones.

My favorite abuse case is where no real wildcarding is done and all they really want to know is, "does this string contain this substring". I find extreme cases in bad perl.

I found a build script that was attempting to prepare localization templates, it would build a regular expression for each variable it was trying to replace (with no real wildcarding of course) and then evaluate each line in the template with every expression. Since the number of lines in the template were directly proportional to the number of variables this was n^2 evaluations.

I replaced this with a simple linear approach where a look up table with all the translations are read into a lookup table in memory and each line of the template can be scanned character by character.

The resulting script went from O(n^2) with regular expressions to O(n) with simple character comparisons, our problem input went from 20 minutes to process to less than a second, 1200 times faster.

Regular expressions are very powerful, but they are no substitute for thinking or datastructures or algorithms.

Don't teach new programmers regular expressions, teach them to think. Teach them how to analyse algorithms. Teach them how to build datastructures.

Then, once you've done all that, then you can teach them regular expressions, but make sure they know what they're doing. (And it won't work, they'll immediately start abusing them, happens every time.)

Slashdot Top Deals

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...