Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:It would be good to have optional GUI (Score 1) 780

Then buy a firewall whose interface only lets you open one IP at a time? Or even one IP/port at a time? If you're using iptables or pf from the CLI then a) you should be capable of configuring a firewall properly and b) it's perfectly correct and desirable that you should be able to tear a goatse in your security for a given IP/subnet/port/interface.

That NAT won't let you do this is a weakness of the technology, not a strength. Protecting a user from themselves is an interface issue, and one that should be possible for an experienced user circumvent if needed. Otherwise you may as well say that Bash shouldn't allow globbing - after all, a user might accidentally type rm * in the wrong directory.

Comment Re:It would be good to have optional GUI (Score 1) 780

It makes perfect sense to design an internal network using RFC1918 addresses, but that doesn't mean the hosts can't all present to the outside world with unique public IPs.*

A downside to NAT for a small home network? How about when you have two or more servers both listening on port 22, and externally you have to remember which port you plucked from thin air in order to be able to get to it? This of course being multiplied by the number of servers and number of services being run on them. It's not the end of the world (for a small network) but it offers no benefit except for conserving IPs.

*(Yes, yes, yes, I'm well aware I've just described one-to-one NAT, but I think it's pretty clear that that's not the type of NAT I'm arguing against.)

Comment Re:PHP is great (Score 1) 519

If your preference is for a full-on strongly typed language then PHP is a poor choice for you. However there are things that can go some way to providing this sort of safety - you can use type hinting to specify what types must be passed to a function (including support for polymorphism, interfaces as you'd expect). But this is still a run-time feature as there is no compile phase. I honestly don't know whether there's a static analysis tool that can use this data along with type-inference techniques to provide "compile-time" type safety, but there may be.

But I reiterate: PHP probably isn't the language for you. I understand your position, as I'm completely anal about code being free from all warnings too. However; I'm also of the opinion that strict type checking actually provides comparatively little benefit. When I fix bugs in our codebase it's almost never due to type mismatches, in fact I can only think of two instances ever where I've thought strong typing would have prevented a bug. On the one hand you may claim that's two bugs too many, but on the other hand that's several years of IMO faster development gained by not having to jump through hoops.

I've yet to use a language with a full type inference system, but it seems like that may be a pretty awesome compromise.

Comment Re:One of the advantages of Linux (Score 1) 433

If you're using a sensible DB (these are all Postgres examples), I may be able to make your life a little easier.

If you want to compare rows, don't bother with a slow and clumsy self-join, use a windowing function and the lead/lag functions. e.g. to list the interesting events and time between them:

select date, message, lead(date) over (order by date) - date as time_to_next from log where type='interesting';

That only shows 'interesting' events, of course. If you want to show all the other events between the interesting ones as well, add a partition by clause to the windowing function to highlight interesting events, and lose the where clause.

And yeah, vim is a good quick and easy way to explore data. So in postgres, add 'export PAGER="vim -"' to your ~/.psqlrc file, and your query results automatically pop up in vim (may want to switch to unaligned output in that case using the \a toggle).

Comment Holy shit (Score 1) 87

I know that slashdot is now pretty much famous for being behind the curve on geek news, but in this instance they got scooped by The Today Program on RADIO FUCKING FOUR.

For people not in the UK who don't know what that is...it's like showing off your new liquid Nitrogen GPU cooling system and your grandma saying "Oh that's nice dear, it's like the one the nurses put in the home last year".

Slashdot Top Deals

If all else fails, lower your standards.

Working...