DISQUS

DISQUS Hello!  The comments on this profile are unclaimed and thus are unverified.

Do they belong to you? Claim these comments.

Tom Swirly's picture

Unregistered

Feeds

aliases

  • Tom Swirly
  • Tom Ritchford

Tom Swirly

4 months ago

in Ruby-style Blocks in Python on Asktav
What's the advantage over simply creating a new, local function?
2 replies
thebitguru Partly that, you don't have to create a new local function. I am not sure if this approach is any faster than defining a function.
tav's picture
tav Tom, it simply makes life easier.

I believe it could be similarly popular in the same way that @decorators have been tremendously popular despite just saving a few bytes.

Ruby has already proven the merits of a block syntax -- check out Rake and Rails for examples of how blocks are used to increase productivity!

7 months ago

in Java : the perpetually undead language on /var/log/mind
Interesting article! But I don't understand what you mean about "special characters in the variable names" in Python? This is a legitimate complaint with Perl, but there are only two special characters that have anything to do with variables, * and %, and even those are very specifically to do only with parameter passing.

I'm in a similiar mind to you overall. While I did pick Python for my most recent work project, it's of moderate size - I wonder how a large Python project with many programmers would really work - yet I don't really have specific objections that I can formalize.

The one problem I see is that with Python's duck typing, if you put the "wrong thing into a slot", you can carry it around forever and then only get an obscure error when you finally use it. But if it happens, it's easy to debug - override the setter for that variable and check the type right then.

I think the advantages you get from being able to easily put a mock anywhere (because "everything's a function") would out-weigh it.

But when I went to do a rewrite of my Java open-source project (a model of turn-based games), I thought long and hard - but eventually went again with Java. Android compatibility was a lot of it but when it came down to it, I wanted strong typing for this general framework.

This is what makes programming interesting!

Thanks for the thoughts.
1 reply
Dhananjay Nene I was referring to the fact that I was uncomfortable with Ruby having the special characters in its variable names - not Python.
I wonder how a large Python project with many programmers would really work

Depends upon the level of discipline and commitment to refactoring regularly. If these are focused on, I think Python will work out far better than Java, else I would recommend one should avoid Python

While duck typing has its own bunch of issues, it does compensate for the same as well. I blogged on some of its implications in http://blog.dhananjaynene.com/2008/09/python-fr... . Duck typing is a highly nuanced aspect and I quickly am unimpressed by people who have a strong opinion about it either way - its good or its bad.

8 months ago

in Ultra-Right Wing Is Now The New Taliban. on TheAmericanBoy | Thought Arena
"The blind hatred for Bush will always perplex and amuse me. "

Are you perhaps not aware that there are hundreds of thousands of innocent people dead in Iraq because of President Bush?

If we aren't supposed to hate people because they commit mass murder, what can we hate them for?

Or, if you think they aren't innocent, can you name an American killed by an Iraqi before the war?

(We all agree that Saddam was a vile dictator. But destroying the country and killing a huge percentage of its people was not the solution to this.)

9 months ago

in Ultra-Right Wing Is Now The New Taliban. on TheAmericanBoy | Thought Arena
"I mean by this the idea that government can use force to make men live in a particular way."

Government does that extremely well, in fact. The reason it's much more likely that you'll be murdered walking down the street in Afghanistan rather than in Germany is entirely because there is functional government in Germany and not in Afghanistan.

Take a look at Argentina. Peaceful, prosperous country until the government collapsed a few years ago. Now it's dangerous beyond belief.

But most important, most of what the government does isn't based on force at all but incentives, nudges and encouragement.

In just the same way that weeding is a comparatively small part of running a good garden, punishing your citizens should be a small part of running a good nation.

The funny part is it's again the "Conservatives" who have upped the numbers of citizens in jail to the extreme point it is today. So if you're railing against this idea, you're railing against the Conservatives and the Bush government. They're the ones with the concentrations camps, they're the ones with the war, they're the ones with the violence issue - not us.

11 months ago

in Yahoo Shows How The Wall Street Financial System Is Broken on Bob Caswell
You're welcome!

I agree completely that Wall Street is broken. This isn't even the worst example, which I believe is the *negative* correlation between CEO salaries and stock performance. In a rational world, a CEO would be rewarded for good performance and penalized for bad performance.
1 reply
Bob Caswell's picture
Bob Caswell Right. My personal favorites are examples like Dell's ex-CEO Kevin Rollins getting $5 million for being fired after making a mess or HP's ex-CEO Carly Fiorina getting $21 million for being fired after HP lost one third of its market value:

http://bobcaswell.com/2007/02/21/dell-ex-ceo-ge...

11 months ago

in Yahoo Shows How The Wall Street Financial System Is Broken on Bob Caswell
[Disclaimer: I don't like Microsoft's products or business model and I work for a competitor.... but.... ]

"it may just be that strategically and financially no one believed the whole deal made any sense and hence Wall Street did work and rejected the deal..."

What exactly does that sentence mean? From the point of view of the stockholders, someone offered to buy a dollar bill from them for $1.30 or so. What possible rational, economic reason would the *stockholders* have to reject this deal?
1 reply
Bob Caswell's picture
Bob Caswell Tom,

Thanks for reiterating my point and also proving that differing opinions on Microsoft or Microsoft business models is pretty irrelevant to the discussion at hand.

1 year ago

in I'm up in the air on this election on The Secret Diary of Steve Jobs
Only a truly shallow person would vote for President based on a haircut.

You do understand, right, that if Edwards had a *bad* haircut then the Republicans would be mocking him for *that*?
Returning? Login