Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

Comment Re:Lots of movies could use this (Score 1) 156

Juliet: "Yea, noise? then I'll be brief. O happy dagger! This is thy sheath; there rust, and let me die."

[fade to black]

Priest called emergency services to transport teenagers to Great National Hospital. Doctors sewed wounds, attached blood bag, and administered antitoxin. Teenagers enrolled at Great Social Camp, where they learned to love country. The End.

Comment Re:Likely because only PHP can parse PHP (Score 1) 67

Hm, yes and no, but mostly no.

Here's one grain of truth for this line-of-thought - e.g. in the past, the Facebook/HHVM/Hack folks talked about how PHP 5.x was difficult to parse because it didn't have a good *spec*, and so there would be some wonky/ill-considered edge-cases in the spec (such as it was). If you don't have a good spec, then the only way to address ambiguities is to poke and prod at the canonical implementation.

It is also true that the `php` runtime gives some parsing functionality like `token_get_all()` - and if you don't want to write or maintain a lexer/parser, then you can re-use the one built-in.

But those aren't computational properties of PHP as a language. They're two sides of the universal "re-write/re-use" trade-off: if you re-write, then you need a good spec. If you re-use, then you need a copy of the thing you're re-using.

However... I think this thread is advancing a stricter argument that *dynamism* prevents parsing. But pretty much every dynamic language is parseable to some degree - even bash and Javascript and LISP. The real question is, "How much useful/actionable information do you get out of the parse-tree?" PHP certainly has abilities like "require $file" or "eval($code)" or "if (...) { class Foo... }" which will frustrate the effort to get useful information. Then again, C/C++ have macros and dynamic linkers; Java has classloaders and reflection APIs; and I can't even count the number of languages with "eval". Dynamism has a role in most ecosystems, and dynamism always creates a blindspot for the tooling.

But... you can still parse all the non-dynamic stuff meaningfully. If the downstream folks are moderately disciplined, and if the IDE/tooling is moderately attentive, then you still get a lot of utility.

Example: in PHP, it's *possible* for a codebase to have 3 files with 3 competing definitions of the same class - with different variants dynamically-loaded based on configuration/environment/input. That's not common, but it can happen, and it is non-determinism from a compiler/metaprogramming/IDE/tooling perspective. Now, an IDE like PhpStorm offers drill-down (click a symbol to open the underlying code). How can it open the right file if there are 3 candidates? Easy work-around: *count* the candidates. If there's only one candidate file (normal case), drill-down on that. If there's 2+, then ask the user which one he wants to see.

Comment State and the Hot Potato (Score 1) 64

I suspect that most HTTP client implementations bundled with languages aim to be stateless by default. For anything that looks like state, the buck gets passed downstream. There is merit in this -- it gives the downstream developer a lot of flexibility. But then we have the problem: several standard HTTP behaviors that we usually take for granted are unworkable by default (i.e. HTTP cookies, HTTP caching, and CRL/OCSP -- which needs caching to perform reasonably).

Typically, a developer wants to say something simple (http.get("http://example.com/the/data")) rather than

cookieStore = new FileCookieStore("/var/lib/my-app-dir-that-someone-has-to-configure/cookies");
cacheStore = new FileCacheStore("/var/lib/my-app-dir-that-someone-has-to-configure/cache");
certValidator = new CachingCertificateValidator(cacheStore, {crl => true, ocsp => true});
httpClient = new HttpClient(cookieStore, cacheStore, certValidator);
httpClient.get('http://example.com/the/data');

Who wants to be responsible for administering/documenting/supporting all those fiddly bits of state?

Comment Re:No (Score 1) 624

Honestly, those are terrible books. If nothing else the signal-to-noise ratio is extremely disproportionate. I mean there are nuggets of good information in the books, but a 1100+ page language tutorial is unnecessary. It would be a stretch to call the series programming books -- let alone "influential" programming books.

Speaking from my experience with the Deitels' C++ book in my first-year programming course, I'll agree that the book perhaps lacked some academic artfulness, that it might not help an already-skilled practitioner, and that I wouldn't read it again. But I loved it at the time -- it was fun to read, it had a sort of progression or flow that was easy but rewarding. More importantly, all those lengthy code snippets help the reader become *conversant* in the language. It's one thing to learn the grammar and basic vocabulary of a new language (which you can do quickly); it's another thing to read a novel, write a poem, watch a movie, or chat up a stranger in a new language.

Comment Re:Cut YouCut (Score 1) 760

I was wondering about that -- how much did the office of the minority whip spend to put together this program?

Well, it turns out that the House publishes their expenses every three months at http://disbursements.house.gov/ . "YouCut" doesn't appear to be explicitly budgeted. (Congress could learn a lesson from the NSF about transparency -- the NSF publishes expenditures for particular projects.)

So that leaves us to do some sleuthing and guesswork. Here are some puzzle-pieces that I found with about 10 minutes of searching:

  • The main site is hosted by the House's IT department.
  • The data-collection for their SMS poll is hosted by tatango.com.
  • The data-collection for the NSF review is hosted on a staff member's personal GoDaddy.com server.
  • The technical labor appears to be valued at ~$90k/yr, although it's not clear how much labor went into this particular project. (A man-day? A man-week? Six man-months?)

If the above facts are indicative of the project and its decision-making, then the project operates on a low-budget basis. Kudos for that.

Of course, "low budget" isn't good enough -- we need to get a return on investment. So what do we get? If the project produces an actively-engaged public which critically and broadly considers the costs and benefits of the national budget, then that would be a good return. If the project elevates the national discourse, then that would be a good return.

But I don't think we'll get that return. Look at the format of the site: each week, a Republican operative edits a list of 3-5 items that he thinks should be cut. This list includes options like "Prohibit Hiring New IRS Agents to Enforce Health Care Law" or "Terminate Taxpayer Funding of National Public Radio." Next, the list is published, and "the public" is asked to vote among these biased options. A week later, the tallies come in and -- surprise! -- the winning option is a Republican talking-point!

So what return will the public get on its investment in YouCut? Well, I guess we'll have some fodder to toss into the Republican machine, and that might help the Republican machine manufacture more outrage.

To recap, the public is investing an unknown (but relatively small) amount in the YouCut program to manufacture Republican outrage. Is that a good investment?

Comment Darmok and Jalad at Tanagra (Score 1) 579

Or, a comment next to a loop would state:

"You spin me right round, baby right round like a record, baby Right round round round"

That's not weird, this guy is just an idiot who can't be bothered commenting his code.

I'm fine with the occasional clever witty comment (I've done it myself) as long as the code makes sense and that everything is documented (e.g. This method does x, y, z and also takes over the world).

I agree with your reaction to the article on "earthweb" -- it's a thin argument. Like you, I also thought about occasional, odd comments that I've put in code, and I tried to judge the listed examples. Of course, there's not enough information to reach my own judgement, so I emoted and projected a little... and now I give this unnamed, undefended developer the benefit of the doubt. He's my comrade in arms and spirit. Surely "Right Round" makes sense in context. Perhaps he was commenting a spinlock in a multithreaded media player with visual animations. The visual animations kept drawing tiedyed ellipsoid upon overlapping, tiedyed, dizzying ellipsoid until the loop finally, mercifully terminated. In this case, his comment is multi-layered, beautiful, astute.

Comment Journalism, Pranknet, and ethics (Score 4, Interesting) 543

There's a very strong norm against publishing phone numbers, addresses, etc in journalism (esp. criminal and political journalism). I readily agree with this norm -- it seems that publishing such information can invite vigilantism and generate life-long problems for the accused without the benefit of a fair trial. I would generally expect journalists to abide this norm in news reports on robbery, drug trafficking, arson, embezzlement, etc.

Never-the-less, I felt a twinge of satisfaction while reading phone numbers and street addresses in TSG's article. I wouldn't mind if these serial harassers received a series of harassing phone calls.

Then again, TSG accuses Pranknet of systematically violating the informal norms that their victims rely on; is it proper for TSG to turn around and break an informal norm of journalism?

I'd like to better understand the ethical question here. Perhaps TSG's approach is the only way to deal with Pranknet? Perhaps it's poetic justice? Has TSG made a special ethical judgement regarding Pranknet? On what basis? Does TSG habitually violate journalistic ethics? Do the participants in Pranknet deserve worse treatment than anyone else accused of crime? How would our opinion change if TSG had presented the story differently?

Quickies

Submission + - 65%Americans Spend More Time With Their PC Than SO

Ant writes: "PR Newswire reports that 65 percent of consumers are spending more time with a computer than with their significant other (SO), according to new independent research commissioned by support.com. Conducted by independent research firm Kelton Research, the "Cyber Stress" study confirmed consumers' growing relationship with technology in their everyday lives. In fact, more than 8 out of 10 Americans (84%) say they are more dependent on their home computer now than they were just three years ago. Like any relationship, the test comes not when things are going well but when times are tough. And unfortunately in the case of their computers, things aren't going so well for Americans... Seen on Blue's News. Well, SO is my computer. [grin]"
Microsoft

Submission + - Submitting Federal Proposals Requires Windows

Petronius Arbiter writes: The US federal government is requiring that proposals for grants etc be submitted using a common system at http://grants.gov/ . That's would be a good idea, except that, effectively, you must use Windows and Explorer. See http://www.grants.gov/resources/download_software. jsp :

To operate PureEdge Viewer, your computer must meet the following system requirements: Windows 98, ME, NT 4.0, 2000, XP... PureEdge on Grants.gov will not run within the Firefox browser.


They do have a Citrix substitute for non-Windows users. However:

Note that a limited amount of users can access the Citrix Server at any one time... Finally, you will find the best time to work and submit an application via Citrix is during off-peak hours, usually between 10 p.m. and 10 a.m., EST.


Finally, if your organization has more than 10 non-Windows users, they want you to add a dedicated Windows box to handle the traffic.

Why is it legal for the federal government to require applicants to use an expensive, proprietary system with terrible security? This is particularly surprising because many technical people, from program officers to computer administrators, in the government personally like open source and detest MS.

As a crazy guess, over 100,000 different people each year submit proposals. That's 100,000 people who must have MS Windows licenses whether they want to or not.

Anyone who was concerned about the open format fight in Massachusetts last year should be concerned about grants.gov.

Finally, for National Science Foundation clients, this is a big step backwards. NSF has had an excellent online system, http://fastlane.nsf.gov/ for years. Fastlane has no bias towards MS. However, by federal edict, NSF people must also use grants.gov.
Red Hat Software

Fedora Core and Fedora Extras To Merge 159

Kelson writes to tell us about a Fedora Weekly News article reporting that, beginning with Fedora 7, the distinction between Core and Extras will cease to exist. This development comes out of the Fedora summit held in November. From the article: "Starting with Fedora 7, there is no more Core, and no more Extras; there is only Fedora. One single repository, built in the community on open source tools, assembled into whatever spins the Fedora community desires." Kelson adds: "The post goes on to list three 'spins' they plan to introduce at Fedora 7's April release: server, desktop and KDE. Presumably these would be 1-disc installation sets, with further packages downloaded over the network, rather than the 5-CD collection needed to install Fedora 6."

Slashdot Top Deals

Whom the gods would destroy, they first teach BASIC.

Working...