Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Yes, but... (Score 3, Interesting) 252

Yes, it is a test question. Yes, if you understand recursion, you can answer the question. However, it is poor code, because the recursion is not tail-recursive; anyone who uses recursion with unknown values ('n' in this case) will write a tail-recursive function.

Since it's a totally artificial question, there is no reason that they couldn't have used a tail-recursive function. Lots of students won't know the difference, but crappy code like this is a stumbling block exactly for the students who really do understand what's going on.

Comment Lack of compiler support !!! (Score 1) 252

I would use recursion a lot more frequently if compilers supported tail recursion. Not for simple iteration, perhaps, but there are plenty of cases where recursion is a better solution that a loop. For example, recursion is often be appropriate when working through some sort of data structure.

The problem is: The most common languages don't optimize for tail recursion. This means that even shallow recursion will eat memory. If the depth of the recursion is unknown, then the lack of optimization for tail-recursion means that your program may run out of memory - not because of any programming error, but due to a defect in the compiler.

There is nothing inherently difficult about handling tail recursion. Scala does it just fine, running on the JVM. I can only imagine that those responsible for mainstream languages figure no one will use it. Well, we, can't, because your compilers don't support it properly...

Comment Weakness of the digital age (Score 1) 178

Most of the comments are technically correct, but everyone seems to have accepted the elephant in the room: We have no decent archival solution for the digital age. The bookkeeping done by monks 600 years ago can still be read today, as long as you can make out their handwriting. Accounts from 19th century companies were kept in ledgers. Barring fire, flood or other disaster, any ledgers someone thought were were keeping are still legible today. Some readers may recall that UBS got in trouble for trying to destroy bank records from WWII - but those records still existed with no effort whatsoever other than having them stacking in some storage closet for 70 years.

Yet without a serious and sustained effort, digital data self-destructs. No commonly used media has a storage life of more than a few years. We have all accepted this as fact, but it is actually a problem in serious need of a solution. As more and more records are kept online - business records, governmental records, personal records - the danger of serious data loss increases.

Want a recent example? In the US, the IRS lost important emails from personal mail accounts, because they had no archival strategy. If they were lying (which I personally tend to suspect), then it was an entirely plausible lie, which still serves to make the point. Just as with security, archival is an overhead expense that management doesn't really want to spend money on.

Comment Dangerously wrong - snake oil (Score 1, Interesting) 201

Somebody is selling snake oil again. Testosterone may have subjectively beneficial short-term effects (virility, muscle tone, etc), but all current evidence is that it shortens your lifespan.

Studies of eunuchs have shown that they live substantially longer than non-castrated men. That's just one link; anyone with a bit of Google-fu will find others. For example, higher levels of testosterone are thought to be a reason that men have shorter lifespans than women.

Comment Utterly counterproductive (Score 1) 779

When will people learn that measures like this promote discrimination.

As soon as you force schools to have more girls in the classes, one of two things will happen: (1) They will forbid interested boys from taking the classes, or (2) they will put uninterested girls into the classes, which will screw up the classes for those who really do want to learn.

Reminds me of the (entirely unofficial, but entirely real) quota systems I have seen in certain schools and companies. Because some women were admitted/hired despite being unqualified, all women in the program were regarded with suspicion. This was utterly unfair to those women who were, in fact, qualified. It encourages discrimination, because everyone assumes that all girls/women are there due to the quota rather than their personal capabilities.

The right approach: Encourage anyone interested to take the classes; ensure that the instructors and administrators are not discouraging anyone because of their gender.

Comment Cash grab of a bankrupt country (Score 1) 825

The thing is: The money this tax is aimed at is not in the US and - by international law - was not earned in the US. To impose such a tax, the US must do some combination of violating signed treaties and forcing foreign jurisdictions to subject themselves to US domestic law. The US might have been able to pull something like that off, say, during the Cold War. Now? After the 2008 banking crisis? After the total muck the US has made of the Middle East? After Snowdon and the NSA revelations? Forget it, the US has lost too much credibility for such a naked power/cash grab to ever work.

Option a: The current US administration really is this clueless. Sadly, a real possibility, given the other idiocies they have shown.

Option b: This is a distraction. Just like a magician - attracts your attention with one hand, while, the other hand...someone is getting his pocket picked.

The US is bloody bankrupt, with current debt approaching $20 trillion and unfunded liabilities of around ten times that amount. It's all about cash, to keep paying for the bread and circuses, so that the political elite can put off the inevitable reckoning just a little bit longer.

Comment We all live in echo chambers (Score 1) 307

I expect than anyone looking at the complete article, with all of the various tables and breakdowns will find at least one item that shocks them. In my case, two examples:

- 45% of Americans view the IRS positively, vs. 48% negatively. To me, this is shocking, because I know that the IRS is a power unto itself. If someone in the IRS decides they want to nail you, you are nailed. Appeal to a court? Sure, but only a court run by the IRS. They can empty your bank accounts, repossess your house, all without any review by any external party. Why anyone would trust an agency with this much power, or view it in a positive light is beyond me.

- More Democrats than Republicans view the DoD positively. Huh?

For me, many of the results are pretty surprising. The point of my comment here: I'll bet that's true for you too. We all live in echo chambers, mostly reading articles that reinforce our beliefs and talking with people who think much the same as we do. Really kind of scary, if you think about it...

Comment Great financial justification (Score 4, Insightful) 91

"The money will be used to fund FirstNet, the government agency tasked with creating the nation's first interoperable broadband network..."

You could just as well put the money in a pile and burn it. Heck, given the inevitable follow-on costs, burning it would be cheaper...

"...contribute over $20 billion to deficit reduction". Meaning it's going into the general fund, where it will be promptly spent three or four times over, each time with the justification that the expenditure has already been paid for by the wireless auction.

Comment For example (Score 2) 148

I don't use Calc or Excel much, but I ran into two such limitations just recently. So, for anyone looking for concrete examples, here are two:

- Column limitation. A student of mine wrote a Java program that exported data into a spreadsheet, using some library or other (don't remember which). Now, I was impressed that this automatically started up Calc, when my student had clearly used Excel. However, as an initial step, the program created a zillion columns. Crash - max columns exceeded. Why should there be any sort of limit, other than exhausting all memory in the computer?

- Macros. I have a small spreadsheet that counts up the students' points and curves them into final course grades. The actual curving is done by a function I defined and attached to the spreadsheet. In Calc, if I alter the points, the sheet doesn't recalculate - I have to save and reload the sheet. No idea why - everything ought to work (and does in Excel).

There are similar irritations in all of the applications. Writer and Impress are the ones I use the most, and sometimes it's damned frustrating. I obviously haven't tried version 4.4 yet - here's hoping that they did more than fiddle with the UI.

Comment Skipping the acronym, on to the contents... (Score 1) 252

Yes, TFS should have defined it's acronym. Failing that, the editors could have caught it - typically, they didn't. Irritating.

On to the actual content: 1 in 5 developers are developing software for devices with embedded software that are likely to wind up with their own internet addresses. Given the high quality, secure software we are accustomed to seeing in routers, PCs, servers, etc.. Given the high level of security awareness we see in the developers in this area. I just gave a remedial lesson in SQL injection, damn it, isn't this stuff taught in primary school?

Given all of this, just think what we have to look forward to: more mediocre developers hard-coding security holes into every device with an embedded processor. Big companies like Verizon with their supercookies will soon be tracking your toilet flushes. The marketeers and the surveillance state will be vacuuming this up - the marketeers to sell you toilet paper, big brother so that the SWAT team can kick down your door while your pants are around your ankles.

O frabjous joy. Is it too late to strangle the Internet of Things in its crib?

Comment A realy cost/benefit analysis would be nice... (Score 1) 304

Would it be too much to ask for them to explicitly discuss cost/benefit of something like this?

Example: Our car has some "smart" routine for detecting glare ice on the road. I don't know if it has ever been right - but there have been literally hundreds of false posltives over the years. Thankfully, it doesn't do anything but beep annoyingly.

Imagine if your car foes into full emergency braking, whenever it thinks an accident is imminent. What level of false positives is acceptable? What level of false negatives? How many accidents are statistlcally likely to be prevented? How many will be caused. Assuming a positive balance, what are the financial costs of building this system into all vehicles - and what is the resultant cost in dollars/life? These are the kinds of information that the Traffic Safety Administration ought to be publishing with their proposal.

If you look at the detailed report, they break the system into three parts. All together, they expect the system to prevent about 100 deaths per year (plus a larger number of injuries. There is a very brief discussion of false positives that arose in their test scenarios (e.g., in section 4.8.1.4), but absolutely no attempt to estimate the number of accidents caused by the system.

Consider how many rear-end accidents the average person has, over how many years and miles. Then figure the reliability - the number of false positives - that can be tolerated - the number is essentially zero. Achieving this will require extraordinarily reliable sensors and software, which willwill be technically difficult and financially costly. None of this is addresses in the report.

Comment Bull pucky (Score 1, Insightful) 200

..."we're connecting community colleges with local employers to train workers to fill high-paying jobs..."

This is what community colleges do. Just exactly how is intervention by the federal government supposed to help? The only change is going to be an increase in the number of administrators the colleges hire to deal with the federal bureaucrats. The next step will be to offer the schools money. Then they'll hire even more administrators in order to suck properly at the federal teat. Finally, the federal government will use their dependence on federal money to impose ridiculous rules and regulations, that require even more administrators.

We've already seen how federal "help" has screwed up the American university system. Tuitions have increased by 200% to 300% in the past 20 years (that being the first example I pulled out of Google).

You know the line: "I'm from the government, and I'm here to help you". Time to run screaming in the opposite direction.

Slashdot Top Deals

Solutions are obvious if one only has the optical power to observe them over the horizon. -- K.A. Arsdall

Working...