Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Comment Re:A Snippet from the Criticism (Score 1) 338

That snipped looks bad. But, if the model was implemented right*, it may be close to best practice.
Rails allows you to overload functions. Ideally, Album#destroy would check if the current user is allowed to delete the object and either delete itself or ignore the request if the user isn't authorized to delete it. Implementing security checks at the model level has the great advantage of limiting all security-related functions to a single, easily audit-able, consistent code path. The snippet still lacks reporting for permission (or missing album) errors, so it's not really nice, but possibly still secure.
Additionally, photos_controller could be using a before_filter checking if the user is authorized to do whatever he's trying to do. Given the snippet, a matching filter function would have to be rather strange, but it could be done.

* Two problems: The code lacks any exception handling and, as far as I know, relying on the user credentials gathered from the session object in a model is not considered best (or even good) practice. This could be somewhat mitigated if Album#destroy were to allow an optional parameter providing a user [id].

Comment Re:Those names are a mistake (Score 1) 396

Consumers would be far better off if the labelling was required to carry the standard name (HDMI 1.3 or HDMI 1.4 with whatever add-on) and a URI pointing to the standards documentation.

Even simpler: Require the (required/tested) bandwidth to be printed on all devices and cables. Cables would be advertised as capable of 5, 10.2 or however many Gbps, devices would sport a table along the lines of 720p = 4 Gbps, 1080i = 6 Gbps, 1080p = 8 Gbps, 1080p60+3D (highest quality) = Over 9000 Gbps. To pick a cable, consumers could look at the packaging, manual or sticker on their devices, pick the greatest mode both devices support and buy a cable capable of at least that throughput. Problem solved, maximum compatibility achieved.

Comment Re:I'm puzzled (Score 1) 384

That was either a couple of decades ago or they eased up on you because of the pre-existing license. As of now, you'll take a written exam consisting of some 40 questions, most about road signs, some about the right of way on strange intersections. Passing that grants you a learner's permit with which you're expected to take about 15 lessons of driver's ed and a mandatory training programme spanning some three evenings before taking the actual exam of some 45 minutes of driving around with an examiner in the passenger seat who will be watching you quite critically.
Passing that, you get a license for three years during which you'll have to visit two whole days of training. Finally, at the end of those three years, if you haven't had your license withdrawn, you'll finally get the definitive one. Total cost starts at at least $1k (just exam fees and trainings), usually around $2-3k (including driver's ed).

Comment Re:Customer service (Score 1) 202

[...] for 12,000 people, eliminating any chance that they will pay Valve for it [...]

They actually seem to have handed out two copies to every affected account, i.e. 24'000 copies total. If even half of the gift ones end up with people who'll play them, Valve gets an 18'000 player boost to their L4D2 community and 18'000 people who might potentially mention L4D2 to their friends and invite them for a round of play.
Valve gets goodwill by the truckload, a large expansion of their player base and tons of inexpensive (but highly valuable word-of-mouth) marketing, those affected by the ban get a free game to play and one to give away -- everybody wins.

Comment Re:dual-screen setups... (Score 1) 375

Does not. Windows will gladly do everything related to screen rotation, including adjusting ClearType.
Just be sure to configure them through the Screen Resolution application in your Control Panel, not the driver configuration window. Tested in 7, for other versions: Upgrade and run whatever legacy apps you've around in a VM.

Comment Re:dual-screen setups... (Score 1) 375

now he has a three-monitor setup with that in the middle and the dual 2007FPs on the sides.

Same here, except with two NEC 2080UXis flanking an HP LP3065. The 20" panel width quite perfectly matches the 30" panel's height, and the awesome mounts of the NECs allow for rotating and matching to the center display with, well, no work at all.
You'll need four DVI channels, though. Two (through a dual-link cable and plug) for the 30" and one each for both 20" displays. I'm not sure if you could handle them both through a dual-link interface, so i threw in a second video card and attached a 1920x1080 projector, which brings the whole system to just above 10 MPixels of display space on 4 sq meters or so.

Comment Re:Size is not as important as resolution (Score 1) 375

20" UXGA displays do have one advantage to 21.3"s: Rotate 'em by 90 degrees and they neatly flank a 30" WQXGA display. 4960x1600 perfectly lined up Pixels is what awesome looks like.
And if you arrange them right (20", 30", 20" side-by-side), you get a huge center area for whatever you're focusing on plus enough screen real estate for whatever you're monitoring in the background (Or need to have an occasional look at.)

Comment Re:If you've nothing to hide... (Score 3, Insightful) 878

In a working direct democracy, the government cannot pass legislation that'll piss a majority of the people off. Unfortunately, and that's not even limited to the US of A, a lot of people are amazingly stupid. But to get back to your examples:

How about another tax hike

Roads, schools, firemen and, well, every other public service need funding. If backed by valid reasons, few people will contest a tax hike.

how about making driking and driving laws so strict that using mouthwash 10 minutes before driving to work will put you over the legal limit

You don't get convicted on a breathalyzer readout (not in Europe, anyways. The strange things you folks overseas do are, well, strange). You'll get taken to the nearest hospital, lose a couple drops of blood and with a bit of a delay you'll be on your way without a charge. Use an alcohol-free mouthwash before your next important appointment and you're good. And again, most people prefer a couple of mouthwash-related blood alcohol tests to hordes of drunk people in control (or lack thereof) of two tons of speeding metal each. Cars are dangerous. Operating dangerous machinery while drunk is deadly.

how about the war on drugs and the laws against certain harmless ones like Pot

That one is quite sad. Basically it boils down to dumb people being afraid of things they don't understand. It's not entirely the politicians' fault, though. Check the voting records of, say, Switzerland, where public votes have been had: the disappointing turnout was some 65% of naysayers. Broaden your horizon: pot consumers tend to be in the 15-30 age bracket, and there's a whole bunch of voters aged 30+ and lots of them don't see a reason to legalize.

how about all the regulations that drive up the costs of consumer goods

Can you spell Nanny State? A lot of people do and really like the concept of it. In any case, it's easier to just regulate everything than find a great balance; and it's easier to just nod things through than propose a better alternative.

how about the laws about speed on straight roads in the middle of nowhere with no traffic

As far as I know, none of the satellite-based have left their trial stages. Save for those, you're good to go: as long as you are concentrated enough to see and react to any speeding cams, patrol cars and wild life from far enough, none of these will bother you. It's quite logical: If you speed only as much as you can actually handle, you won't be arrested because you'll already have slowed down to the speed limit in the event of a checkpoint. If you couldn't manage that, you were demonstrably going faster than you can handle and should get ticketed.
In any case, speeding cams get approval ratings of around 70% in the UK. Speed limits probably even higher. This is not the government working against you, it's the government working for the majority of voters.

Comment Re:tell em how you feel... (Score 1) 220

The card companies hate that.

They don't. They get around 2-3% of every transaction, which is quite enough to make them very profitable. Of course, charging you 15% APR on way too much credit is even more profitable, but not required. If you want to piss them off (and can take a bit of a dive in your credit score), take up one of the numerous "0% APR over 12 months" offers and clear the card right out. Expect to be charged $5 per withdrawal, so head to the bank counter and get those $10k or whatever you're approved for in one swoop instead of ten transactions at the ATM. Deposit all of it into a high-yield savings account (2-3% are quite realistic) or, if you're feeling really ballsy, stocks*. After a year, pay off your $10k in credit card debt and keep the $2-300. Or, if you've gotten another "0% APR" offer, get it and use it to pay off the other card, netting you another 12 months of interest-free capital to play with; totalling $400-$650 with no risk or associated cost.

Oh, and 'cause this is slashdot, we'll need a car analogy: Paying off in full at the end of the month is like hailing a taxi, having it drive to the airport and not tipping: very much okay. Aggregating debt is like taking the taxi at the very back of the row at a train station, having yourself driven to the airport and tipping generously. What I've described above is catching the cab at the front of the line (after the driver has been waiting in there for an hour or so), having yourself driven around the block, getting out after half a mile and not tipping. Heh.

* Stocks are very profitable for long-term investments. If, after a year, your portfolio has not made any progress, you will be deeper in the shitter than you'd be if you'd have stuck to your own cash. You will not be breaking even against a 15% APR on your capital. Do NOT invest more in stocks than you have on hand and can spare. Mortgages, nest eggs and retirement savings (after passing 50 or so) are not in that group.

Comment Re:The funny part is, it's still better than Andro (Score 1) 417

some of HTC's "enhancements" to Android have been anything but

True. To every upside, there's probably a downside. HTC's keyboard is a great example: a lot better when it comes to entering numbers, worse when it comes to exotic umlauts or accents and it lacks the context-sensitive "Next"/"Done"/"Search"/":-)" key. The parts of Sense I'd really like to see on my Nexus One are the Phone App and mayhaps the calendar widget, the rest doesn't strike me as too useful.

On another note, Eclaire in GP should obviously be Eclair, and all instances of [Ee]clair should be FroYo. My bad.

Comment Re:The funny part is, it's still better than Andro (Score 1) 417

On my Nexus One (running Eclaire right now), I can:

- Copy and paste within the mail app by pressing the menu button, and using the "Select Text" feature.
- Copy text messages with a long press onto the message, then "Copy Message Text"
- Browse anything I've tried so far. If you'll get me a link to your crashy MSDN page, I'll try it.

The whole smoothness aspect has made a lot of progress from 2.1 to 2.2. Before, animations and all did feel slightly sluggier than on an iPhone 3GS; running eclair everything is as smooth as it gets. Applications launch in what amounts to no wait time. Absolutely marvelous.

Slashdot Top Deals

What is research but a blind date with knowledge? -- Will Harvey

Working...