Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×

Comment Re:Nag, Nag, Nag. (Score 1) 277

Yes. For one, the true value of having two different block begin and end tokens is similar to the value of double entry bookkeeping. In Python there is only one "token" denoting a change of block (in this case the token is just the change in number of indent spaces). As a result, ambiguities and outright errors can be impossible for the parser to recognize.

You are absolutely correct. That, a lack of begin/ending tokens, a lack of a ternary operator, and (pre Python 3.x), limited lambda expression support are my biggest gripes with the language.

Comment Re:Nag, Nag, Nag. (Score 1) 277

Im my opinion. any language that allows for "accidental violations that render [the] code invalid" is just garbage.

Like... missing a semi colon.

I mean, really, somebody or something put or remove a whitespace randomly (a whitespace so called because it is invisible)

Depends on the IDE (I typically configure Eclipse and Notepad++ to show whitespace). Hell, even VIM can let you do that.

Even without those settings, whitespace is not invisible either. And the rules are not that spacing must be neat and tidy, but simply that they are compatible within and among blocks.

True that people can accidentally mess it up (hell, I've done it myself)... but shit man, unit tests? CI? Testing code snippets in a REPL when you have one? There is not a goddamned excuse NOT to do any of that regardless of the language that you are using.

The only way for this rules to cause havoc is for people that are doing fire-and-forget programming. That is all.

will render your whole program invalid, and you defend such a language?

I'm not defending, I'm explaining and quantifying the problem, and I'm proposing, based on the evidence I've seen in real life, that continuous pain with indentation rules in Python have to do with people not doing shit they are supposed to do (continuous testing, coding small, testing small, refactoring, etc.) Shit that they are supposed to do in any language.

So, indentation rules are simply compounding problems that are more fundamental and closer to that area between the keyboard and the chair. I'm not defending, I'm explaining.

Comment ECO 101 (Score 2) 133

Paid? Then it's not free.

The add-ins are not. The app itself is.

And won't people crack it or get around measures in the same way people do for everything?

Most people do not. Do you really think the average smartphone user is going to be invest hours away to thinker and bypass such measures just to avoid paying $0.99 (the average price of an upgrade/add-in)? Most people, even tech savvy ones do not.

The sheer scale of the market makes it a number game. It doesn't matter if some people bypass the measures. There are potentially millions who do not, and of which a small fraction might pay for the upgrade. A small fraction of a very large number might still be large enough to get your ROI back. That is how it works.

Comment Nag, Nag, Nag. (Score 4, Insightful) 277

I'll bet it was easier than hunting down the invisible bugs from mixed tabs/spaces or introduced by your editor mangling indentation while moving bits of code around.

Which is easily solvable by setting spaces-for-tabs in your editor (and which I do when working in Python, ... or Java... or C/C++... or pretty much everything because that really solves a whole bunch of issues.)

And violations of spacing/indentation rules are trivially caught by with automated testing/CI, which I do with Jython... or Java... or even C/C++ .... or pretty much everything whenever possible because it is the sane thing to do.

I've only been doing Python for 2 years, including C-to-Python bindings using Python 2.7x, Java-to-Jython/WLST integration (with Jython/WLST being based on Python 2.2), and a tiny bit of Windows automation with IronPython.

Most of my background is Java for enterprise development and C/C++ for embedded/system-level development.

As such, I initially I stumbled across some of the nuisances with Python, the spaces, the lack of a stack trace on exceptions, or the fact that exception hierarchies are slightly, but oh-so-different between Python 2.2 and 2.7. But past those stumbles, I simply use tool configs, procedures and coding standards to deal with them.

And that is the same when I do Java or C++. Each has their own gotchas and effective Java/C++ developers simply do the same - use tool configs, procedures and coding standards to deal with them.

Why would anyone mix tabs with spaces. Use one or the other, regardless of whether you do Python or not. If I see a code base in any language that has that shit mixed up, I know I'm bound to find some other stupid shit in the code.

Why? Because mixing tabs with spaces all over the place, like spelling errors, lack of meaningful comments and/or deeply nested code (arrow anti-patterns), these are all proxies for bad coding practices.

I originally found Python indentation rules to be annoying. After all, how hard is it to auto-indent from an IDE or a command line (or force an auto-indent of code before checking in, or en mass before merging back to the trunk)?

But you know what, people are idiots, and I've learned IN GENERAL not to expect them to write clean code (nor tell clean code from apple pie.)

It is still possible to write horrible Python code, but it is a lot harder to do so in it than in Java or C++ or C#. I would still have preferred to see Python having start and end markers for blocks (a-la begin/end or curly braces) on top of indentation rules.

But it is still a good compromise. Hard to see where code blocks end? Increase indentation. Better yet, refactor that shit out. If I see I have a harder time telling the end of a block, chances are that block is already large (time to refactor out), or that there is a lot of code around it (time to split it into better levels of abstraction).

You know, the kind of stuff we are supposed to do in any language anyways.

Besides, accidental violations that render Python code invalid, those things are trivially solvable by doing shit we are supposed to be doing anyway (namely, avoiding mixing tabs and spaces, automated testing, keeping code small and at least dry-run your shit before committing it to source control.)

I'm not saying programming in Python is Nirvana (for some things, it truly sucks.) But some of the things people complain about, they are just asinine complains for shit that broke because, on a fundamental level, they are not following good industrial practices IMO.

Comment Consider this (Score 1) 262

If the crime happens in public, and it IS a crime, I paid, I want to see it. Even if I have to wait til court is over, but as public OWNER of the footage I demand to see a return on my investment. Protect the innocent by holding the film 'till after court. If they are guilty release it, if not, it wasn't a crime and it's no ones business. Whatever I do with MY footage then, is MY business. Fuck the guilty.

Police officer finds 9-year old girl, unconscious behind some bushes IN A PUBLIC PARK, completely nude and obviously the victim of a sex assault. The scene is captured on camera.

Using this real life scenario, care to run your "I paid, I want to see it" rant by me again? Are you really that obtuse or unable to think analytically that you fail to see how your idea is utterly idiotic?

Comment Off the tangent, but... (Score 1) 155

He has a point. Every story about women in STEM is plagued with posts trying to disrupt any effort to improve things. Typical arguments include: - There is no problem - Girls just don't like computers ...

Is it possible that either of these are true, even in a general sense? There are gender disparities in several fields. The median salary for nurses is $65,470, whereas the median salary for IT Technicians is $42,992

OMFG, who the hell would want to work in IT for less than $42K a year? Because if $42K/year is the median that would suggest half of all IT technicians are getting paid peanuts. Unless you live in a low-cost, rural small city or town, less than $42K/year is very goddamned low nowadays.

Comment Re:Wouldn't time be better spent... (Score 1) 481

Stating calmly that you do not consent to the search as it is a violation of your rights is "bravado and grandstanding"?

Short answer: no. Long answer: that is not the type of behavior I'm referring to. Feel free to conflate the two if that gives you the last word. The entire topic of discussion is about a school teaching teenagers how to deal with police encounters. This is not about adults discussing common sense behavior. Nice red herring btw.

Why would it have to be?

It doesn't. But that is not the type of behavior under discussion.

Oh wait your entire life advice column is hinged on that contrived notion.

No. It is an answer to this question in bold below:

"If your rights are violated you deal with it later"

What exactly do you gain by consenting to an illegal request of a power they do not have?

If you want to conflate topics, go for it, but don't get all uptight when people call you for being obtuse on purpose.

Comment Re:Wouldn't time be better spent... (Score 5, Insightful) 481

"If your rights are violated you deal with it later"

What exactly do you gain by consenting to an illegal request of a power they do not have?

Not get killed? Live for another day where you can fight for legal remedy, and hopefully create a legal precedent that will prevent such violations in the future?

Subservience only reinforces their grandstanding and power playing.

This is all bravado from your part. Until you have actually dealt with situations like that, face to face, you ought to temper it and think a little.

There are moments in life when it is appropriate to disobey a law and deal with the consequences (see Rosa Park or Gandhi, or recently Arnold Abbott).

This is specially true if violations of your rights (or your "violation" of an unjust law) is done in public, to bring awareness to a just cause. This is particularly true when violations are the manifestation of egregious institutions (colonialism, institutionalized racism, to less diabolical but still egregious ones such as laws preventing feeding of homeless.

Here, you, the generic "you", are full aware of it, and you have a made a decision to take the hit for a greater cause. On the other hand, there are times to play possum, in particular if violation of your rights just happen because you are there on the wrong time, being incidental of you just being you, without you planning to take the hit for a greater cause.

You coming from an event and getting arrested because "you" look the profile, or getting handcuffed while picking up your kids because you look suspicious, even when teachers are vouching for you. Etc, etc.

In such cases when you are just living your daily life, play possum, litigate later. This is specially true when you have family that depends on you.

Telling other people to go martyr just because it sounds good and right, that's just unhelpful bravado. This has nothing to do with doing the right thing, but everything to do with making a post where you sound brave and rightful.

Ignorance of the law on the side of the police is not an excuse, just as ignorance of law among a civilian is no excuse.

None of that justifies telling other people to escalate things when in a position of vulnerability. This is not a comic book, and you are not GI Joe.

Learn to pick your battles, and you pick them, learn how to fight and win them.

Comment Re:Wouldn't time be better spent... (Score 1) 481

No, just when they're committed by people with guns in positions of power.

That would exclude people without guns in a position of power. I know where you are coming from, but you better polish the logic you use to structure your arguments if you really want to make clear, precise points.

Comment Yep, this is the way to go. (Score 3, Interesting) 481

Their first concern is to not get shot in the head. Teaching kids that they need to obey lawful orders and recognize unlawful ones is the right approach. If your rights are violated you deal with it later, not when a nervous person holding a gun is telling you what to do.

This. Specially for inexperienced teenagers who, for whatever fucksake reasons (biological maturity, society, etc) might (will) lack the social, communication and cognitive skills for de-escalation and negotiation that adults (should/typically) have.

Consent and litigate later, or know how to not consent without getting killed. OTH, if a 200+lbs person in a position of power wants to strangle a 100lbs handcuffed crying teenager on the back of his patrol car, there is nothing that kid can do.

^^^ And I say this because I witnessed it on a park right in front of my house. I was sitting on a bench in front of my house near a tree when a patrol car stopped there (some investigation going on, whatever.) The car parked, the officer, a gorilla of a man, got out of the driver's seat, went to the back and started chocking the shit out of this kid.

He stopped when his partner nodded to him that there were people (me) watching. They took off, God knows where.

I'm not making this shit up, and this was with my house in one of the supposedly nice, upper middle class neighborhoods in South Florida. Just imagine the type of crap that occurs in less affluent neighborhoods.

Comment Globalization, not automation. (Score 2) 111

... you should at least take into consideration the fact that automation has been increasing for over a century, as well as population, and yet unemployment has remained relatively constant

I am not necessarily worried about unemployment; I am worried about the increasing gap between the elite and everyone else. Early automation created the need for the middle class, as the wealthy needed trained people to run the machines. But in the past 40 years automation has become far more capable and sophisticated. It requires less people to run modern machines, but they need to be far more skilled than the last generation. This has lead to the shrinking middle class, the rising 1%, and also the rising upper middle class.

Accelerated, more sophisticated automation didn't by itself led to a shrinking of the middle class. It is not even the primary factor. Globalization did that. A middle class that was not educationally prepare to move out of what I call "manual/rudimentary" manufacturing, and a national difficulty to operate efficiently, those two played a significant role.

Remember, middle class used to denote blue collar jobs.

But those jobs started to go bye bye quite some time ago. It even preceded 2000's globalization and contemporary automation. The blue-collar middle class built around the auto industry was hurt significantly when it got to compete against Japanese auto makers. Middle class jobs built around the semi conductor industry got severely affected when it could not compete against Taiwanese and Japanese semiconductors.

In the early 90's, way before I got into college I used to work as an electronic welder out in Burbank, CA. Nice gig, but you know what, that type of job went somewhere else. A lot of people back then did not realize the seismic change, and were not equipped to re-adapt.

It used to be the case that Grandpa would work in a good gig, a decent gig, that provided everything he needed, savings, a car and a house. Dad then would work on the same. And then the son. Nothing wrong with that. One generation would pick the trades of the previous one.

That continuity started to break around the late 70's, early 80's, with a full spinal breakage by the late 90's. That generational-job continuity I refer to was possible because there was no industrial competition to speak off. The end of that was inevitable.

The younger generations (some X's and most millennials) are better equipped to make the transition. It's the people within the 35-45 bracket who came out unprepared, those are the ones that are going to be limping for some time, maybe forever.

Automation has very little to do with it because, without globalization, those people displaced by automation would have gone to do something else with little external pressure off international competition.

The country is going to adapt, but a lot of people are going to be limping economically till that happens.

Comment Re:There's not a lot to say, this is scummy (Score 2) 299

When journalists start to attack the company because the guy at the top is happy that he's getting laid that begins to sound like journalists engaging in personal attacks.

It's all about context. There is a suggested story that is painting Uber's corporate culture as one that engages in sexism, all that embedded in alleged questionable practices. As a result, it is worthy of investigation.

If the guy was just getting laid left and right like Tony Stark but the company is relatively free of controversy (in particular controversy that can be construed as illegal) untangled completely from the guy's personal life, then you have a point.

To me, this type of reaction just affirms that there is something systematically and systemically psycho going on there.

At that point I can see some people deciding to return the favor.

Depend on the type of people. Not every biologically grown-up person acts like a 4th grader.

Now when they describe things the company is actually doing that are anti-consumer then I think they are doing their job. If drivers are actually attacking passengers then of course it should be reported and the company should take action to investigate and discipline the drivers if they are guilty.

No argument here, I agree with your paragraph.

Comment Re:There's not a lot to say, this is scummy (Score 1) 299

> That is all great and dandy, but that has nothing to do with trying to find dirt in journalists' personal life.

The journalists sure don't mind digging into theirs...

Journalists are supposed to report things, and in the case of high-profile cases, behavior within the confines and image of the business that could be construed as problematic, questionable and/or sexist.

Uber could simply choose to file a defamation suit if it has what it needs to prove a defamation took place. Companies, like individuals, can choose how to act according to the validity of their arguments or counter-arguments (or they can act like 4th graders.)

Comment Re:There's not a lot to say, this is scummy (Score 1) 299

what if the digging reveals that they were getting money from cab companies & taxi driver unions? or maybe they have close friends/relatives that own/drive taxis?

In that case that is not personal dirt digging, or digging into a person's personal life. The former has very specific parameters that limit the search towards that which is relevant to the issue at hand. The later is a free-for-all McCarthyan fishing expedition that digs up everything, private sexual lives, problems with in-laws, personality flaws, all stuff that has nothing to do with reporting alleged business bad practices.

We have been there before, we know how that worked out. So why people cab be so obtuse and refuse to see the difference?

Slashdot Top Deals

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (5) All right, who's the wiseguy who stuck this trigraph stuff in here?

Working...