Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

Comment Well... (Score 1) 411

Three things:

- First, Java is needlessly wordy - consider the necessity of explicity writing getters/setters for any class where you want access control. What a pile of code for nothing.

- Second, you can write cryptic code or you can write understandable code. Understandable code involves a few more newlines, so what?

- Lastly, depending on your developers, yes, you can have overly long code. Someone who re-implements the same functionality 10 times instead of defining an abstract class and implementing it once - such developers exist. if you have one in your team, I do feel sorry for you. How prevalent is this? No idea...

Of course, TFA wasn't really about any of this. It is about a semantic analysis that determines the number of unique concepts in a method, reducing it to a "minset" which is no longer executable. This is an interesting theoretical analysis, but doesn't have a lot to do with real programs designed to actually perform actions with those concepts. Some methods are wordy because you want them to be clear, others are wordy because of what you are doing, and still others are wordy because of characteristics of the language you are working in.

Comment "powers data centers with renewable energy" (Score 1) 191

"[Apple] powers all of its data centers with renewable energy"

Solar makes lots of sense in the California desert. However, I find statements like the above really annoying. In the night, solar provides zilch. On calm days, the same for wind. Apple's data centers hang off the grid like anyone else, and the great weakness of all renewables is irregular production and lack of storage.

Comment Actually a UK bank (Score 2) 129

The data comes from the Swiss subsidiary, but HSBC is actually a British bank. And you have to love this bit from TFA:

"The man in charge of HSBC at the time, Stephen Green, was made a Conservative peer and appointed to the government. Lord Green was made a minister eight months after HMRC had been given the leaked documents from his bank. He served as a minister of trade and investment until 2013."

The little fish will be prosecuted, while the big fish are made peers of the realm. Business as usual for all of the big banks.

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.

Slashdot Top Deals

The optimum committee has no members. -- Norman Augustine

Working...