Slashdot is powered by your submissions, so send in your scoop


Forgot your password?

Comment Another outrage story? (Score 2, Insightful) 1079

I realize that what I'm about to say might not appeal to you. Please try to keep an open mind.

I've been reading Slashdot since about 1999. I've seen a lot of "outrage stories". Stories intended to get your blood pressure shooting through the roof. And they used to work on me.

Remember when Iraq invaded Kuwait? The story was circulated that Iraqi soldiers were taking premature babies out of incubators and throwing them on the ground. Turned out to be a total fabrication, created by Kuwait to get the US into the war. It worked.

Every controversy has two sides. No sane court will convict without hearing both sides. "There are two sides to every beef."

The "outrage story" is always based on giving you only one side. And it works - until you're old enough to recognize it.

Realize that every person who had an unpleasant contact with these border guards could tell a similar story. Only one in a 100 will recognize his own mistake. The majority will claim that he was nice, and the other guy created the problem.

Comment Re:Good he could sacrifice a good 30 seconds (Score 1) 71

...and almost any serious MySQL shop uses InnoDB exclusively...

I work at a pretty serious MySQL user, and we use both MyIsam and InnoDB. Properly tuned and used, Isam is faster. Innodb allegedly has the edge in PK-lookups, but my measurements disagree.

Innodb is good if you want Oracle-ish features. Mostly we don't. In fact, the current is flowing the other way; towards things even leaner than MySQL.

We mysqldump the slave, which eliminates that issue. (You can also stop the slave and cp the db files; I think this does not work with Inno). Table locks remain a serious performance issue in Isam; it does take extra effort to prevent lock contention.

Comment Re:how stupid (Score 1) 378

Thank you. It still seems to me that the more beneficial part of attr_accessor (automating accessor boilerplate) can be done at compile time.

The term "Monkey Patching" is new to me. If you wanted to (and I shudder at the thought) you could probably apply it to virtual methods in C++ since their addresses are stored in a class vtable.

Comment Re:how stupid (Score 1) 378

Eg attr_accessor. It is a method which, when evaluated by the interpreter generates accessor methods for the names passed in.

I know nothing about Ruby and attr_accessor, but from a quick search this seems to be a compile-time feature. Couldn't you add attr_accessor to a C++ compiler? The compiler would generate the accessor methods.

Comment Re:Just because PHP is popular (Score 1) 378

Perl can be written to be prettier than Python or uglier than anything else imaginable.

Even well-written Perl is noisier than Python.

my $txn = $store->getTxnGroup()->getTxn($txn_id);
txn = store.getTxnGroup().getTxn(txn_id)


my $ids = [ map { $_->{ id } } @$txns ];
ids = [i['id'] for i in txns]

I still love Perl, but can only think of one place where it's prettier than Python - that's quoting.

Comment Re:We are in a post-rational debate (Score 1) 155

I work at BIGCO. Everything you say is partly true, but:

I've developed apps on Oracle and MySQL. Cost is not a factor; we get Oracle for free here. And yet I always choose MySQL for new projects. And that is the overwhelming majority preference, among experienced engineers who disagree on lots of other things. Why?

  1. Performance. Even with good DBAs investing a lot of time, Oracle cannot deliver. Remember, we tune our schema and MySQL instance until it's faster than many custom-written datastores. (Obviously, I'm talking about MyISAM). MySQL is so fat-free that it's hard to beat in custom C. And yes, MySQL's performance falls off rapidly with complex queries. Query optimization does consume significant engineering time.
  2. Hassle factor. Just as you feel MySQL has imposed too much weirdness on you, I feel that Oracle has wasted too many of my hours. Everything about this db is clumsy, old-fashioned and obscure.
  3. Transaction-phobia. We're not doing banking apps here. I remember Oracle instances getting slow because open sessions are piling up, either from humans, broken pooling, or scripts. One more headache I'm thankfully free from.

There's no free lunch here. Oracle provides a more seamless abstraction, including ACID, at the price of performance. That is an appropriate tradeoff for some apps.

Comment Re:It doesn't work that way (Score 1) 901

It is complex. Part of engineering is constantly evaluating what-if scenarios. In my group, the Indian engineers are so much faster at mental arithmetic that they can evaluate a possibility without "breaking stride". In practice, it means more ideas are considered.

It's tempting to dismiss arithmetic as useless because we have electronic support, but having it on tap does change the dynamic of design meetings.

Of course I know that power came at a price; many extra hours spent drilling arithmetic instead of learning an instrument, or hacking, or whatever.

Comment Re:It doesn't work that way (Score 1) 901

Beating "us" at what?? Cheap labor? Human rights violations? Mass poverty?

Beating us at being a world power. Yes, we are still ahead. But the first derivative favors China.

I just read a great article on Gao Xiqing, a Chinese official who oversees $200 billion of China's US investment. Studied and worked in the US. He probably has a better sense of where the US is heading than most of us.

He criticized the tendency for the brightest Americans to pursue Law, MBA, and finance rather than engineering/science. (Caused by salary imbalance).

In the long term, if a country full of lawyers, MBAs and financial wizards, with no industrial base, gets in a war with a country of engineers and scientists with a huge industrial base, what do you think will happen?

Your experience is limited to dealing and interacting with Chinese/Indian/etc software engineers who are most likely members of the upper echelon of their country's respective caste systems. The ones with the opportunities to study abroad, attend universities, build careers, etc. Of course it will seem like the entire population values education as highly as you make it seem if that is all you deal with.

That's a good point in general. But my co-worker's children are in school in China, because American school doesn't challenge them. I forget the exact delta in math education, but it's big.

Comment It doesn't work that way (Score 5, Insightful) 901

I work with lots of good Chinese and Indian software engineers. Most never saw a computer before University. They did have a rigorous and old-fashioned education, with lots of math and logic.

I also know talented hackers who got into programming as kids/teenagers, and benefited from the fast dev cycle of Apples, TRS-80s, etc.

But giving kids the latest and greatest computers is not going to help anything. The important stuff can be learned on a 486.

Chinese and Indian schools value the academic achievers, while American schools value the funny, the athletic and the socially gifted. That is why those countries are beating us.

Comment Re:evolve or die (Score 1) 311

I've worked on both good and bad Perl. Perl's sigils are not an issue; neither are Lisp's parentheses or Python's whitespace. These things cease to annoy once you spend some time with the language.

The reason there's a lot of bad Perl is the reason there's a lot of bad PHP: both languages enable beginning programmers to get things done.

Slashdot Top Deals

I have a very small mind and must live with it. -- E. Dijkstra