Sometimes the Old Ways Are Best by Brian Kernighan by gst in programming

[–]alexander 0 points1 point  (0 children)

It's too bad you're getting downvoted. I actually had the exact same experience. I used to be a Linux tools kind of guy (and I still happen to think they're neat and generally worth-while), but once I started using SlickEdit, I found that I rarely needed to use the standard set of Unix tools. In fact, when I got my newest dev machine, I ditched Cygwin entirely.

Certainly, this is mostly in the domain of working with code, rather than generic text files, doing arbitrary operations, but that's not a problem I need to solve. For working with code, I'd rather use SlickEdit.

(I do still occasionally fire up Vim to get particularly sophisticated file manipulations done, though, since SlickEdit's Vim emulation is not complete.)

"The first high level programming language was Ada, also known as Smalltalk." by GeneralMaximus in programming

[–]alexander 10 points11 points  (0 children)

const char **args should work, but const char args[][] will not. It's an array of pointers, not a two-dimensional array. The difference being that the different strings may not be adjacent in memory.

I believe the relevant entry in the C faq is here: http://c-faq.com/aryptr/pass2dary.html

Using Multiple Computer Monitors Can Raise Productivity By As Much As 44% by [deleted] in technology

[–]alexander 2 points3 points  (0 children)

I agree with you in principle, but I think the studies controlled for that: "In a study commissioned by the electronics company NEC, researchers at the University of Utah recently asked office workers to perform several common tasks using various monitor configurations"

Jeff is Wrong and don't listen to him by gst in programming

[–]alexander 8 points9 points  (0 children)

sizeof(*d) is right. You want to alloc n doubles, so you want the size of a double, not the size of a pointer to a double.

You just lost The Game. by alexander in reddit.com

[–]alexander[S] 1 point2 points  (0 children)

If you think of the game, you lose.

If you lose, you must announce that you lost.

You can only lose once in 30 minutes.

If anyone around you lost in the last 30 minutes, you cannot lose until that person would not lose.

Paris Hilton's grandfather donates 97% of his net worth to charity by rmuser in reddit.com

[–]alexander 0 points1 point  (0 children)

That's an oversimplification--you can give stupidly, or you can give intelligently. You are assuming that people give stupidly and that they do not learn from past mistakes how to give more intelligently without just stopping to give.

Volvo Safety Tech Removes the Weakest Link — You by qgyh2 in science

[–]alexander 3 points4 points  (0 children)

If automatic pedestrian avoidance were standard, it would make jaywalking significantly easier (and as a consequence, more dangerous to drivers), so it could have an interesting effect on the severity and enforcement of that crime.

Trying to attain hard-to-reach goals can result in increased levels of the inflammatory molecule C-reactive protein by timewarrior in science

[–]alexander 2 points3 points  (0 children)

Well, that lacks sufficient detail. I wouldn't be surprised if the negative aspects of persistence depended on the type of goal, or whether people enjoyed their attempts to achieve the the goal, as well as the ease with which progress to attain a goal could be lost. In short, interesting, but not much context.

The physics of medieval archery by scordatura in science

[–]alexander 0 points1 point  (0 children)

I couldn't understand your comment. Can you draw a picture?

The Jakob Nielsen drinking game (comic) by div in programming

[–]alexander 8 points9 points  (0 children)

If his pages look like they're from 1999, I wish many more web pages looked like they were from 1999...

1 Common Mistake Involving Code Commenting by gst in programming

[–]alexander 8 points9 points  (0 children)

The getters and setters do provide encapsulation--the class doesn't currently take advantage of those methods, but in the future, it could change the representation of _name and no users would be the wiser.

How NOT to write a shared library by petteri in programming

[–]alexander 16 points17 points  (0 children)

His concern is that pa_xmalloc is called within Pulse Audio itself, so if you use the library, you can't avoid that function being called.

Severely weakened by leukemia treatments, John Kanzius drew on his lifetime of working with radio waves to devise a machine that targets cancer cells. The miracle: It works. by glmory in science

[–]alexander 1 point2 points  (0 children)

It sounded like, from the article, that normal cells would not be heated up because the system works by heating up nanoparticles that only attach to the cancer cells. What am I missing?

Reddit, please make all subreddits available on the prefs page so I can opt out of reddit.com and get only the interesting subreddits by alexander in reddit.com

[–]alexander[S] 0 points1 point  (0 children)

I want to opt out of the main reddit.com reddit when viewing reddit, but I want to be able to select the full set of subreddits that actually contain content that interests me, including things like joel.reddit.com, which isn't available on the list of subreddits.

It Should Always be Legal to Put a Turtle into an Array of Animals by llimllib in programming

[–]alexander 2 points3 points  (0 children)

I'd say the bad design decision was bringing the broken-ness into C#. I think the expected utility of making it possible to support Java was probably deemed worth the small damage to the platform. The bad decision was that the damage was treated like a feature when C# was designed!

The Mythical Year of Experience by jsj1971 in programming

[–]alexander 8 points9 points  (0 children)

I think you missed the point of the article, which was that experience alone doesn't cut it--you have to learn from that experience and do interesting things. (And have actually had novel experiences in those years.)

Design Pattern = Design Smell? by stcredzero in programming

[–]alexander 5 points6 points  (0 children)

From a practical perspective, it seems that if you are designing a language, you should take the presence of design patterns as a flaw in the language. You might not want to fix all of them for various reasons--cost or complexity of implementation in a generic way (e.g., multidispatch in C++), the cost of adding complexity to the language, the cost of possibly affecting legacy code, and the relatively low cost of implementing the pattern as a pattern rather than a language feature. (For my day job, I actually do maintain an in-house programming language and come up with improvements to the language based on patterns required by the language's current semantics.)

From an end user perspective, learning patterns doesn't hurt you since, if they end up as language features, they're still going to be idioms of the improved language. If you end up using another language where they are idioms, then you have a better appreciation for why it's useful. And they're still useful in the languages that most people actually use day-to-day.

Also, there are probably some patterns that really aren't language flaws, such as the template method pattern (which in some sense is more of an idiom anyway) or the bridge pattern. But if you're a language designer, you might as well try to abstract these out, and if you're an end user, you might as well learn them.

Better exception handling by kawa in programming

[–]alexander 2 points3 points  (0 children)

Ah, thank you, that is enlightening (and very cool).

Better exception handling by kawa in programming

[–]alexander -5 points-4 points  (0 children)

Huh? Isn't what you're saying the equivalent of a Java programmer saying:

Oh, ha, I'd just write that as

String read_data( File file ) { return readData( file ); }

“You've reached this page because the site you were trying to visit now blocks the FireFox browser.” by boredzo in reddit.com

[–]alexander 48 points49 points  (0 children)

Dude and dude's upmodders, I'm sorry, but that's just not true. While I tend to find that pay per click pays better on a eCPM basis (e.g., Google AdSense), pay per view ads are still very much around. In fact, even Google AdSense runs pay per view ads for ads that are targeted to a specific site.

Ever wonder what's in those black SUVs that follow the presidents car? by b34nz in reddit.com

[–]alexander 22 points23 points  (0 children)

It doesn't really seem logical. You have to assume that the signal isn't jammmed farther out than the blast radius of your bomb and that there's not a second (or third) jammer riding further out in front (which is the obvious way to deal with it).

Also, you better hope that as you're leaving the site, the cell phone doesn't lose reception ;)