Slashdot Mirror


User: TheLink

TheLink's activity in the archive.

Stories
0
Comments
12,789
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 12,789

  1. Re:Is any work being done to improve security? on PHP 5.1.0 Released · · Score: 1

    "would it not hurt to have Remember to use addslashes() on any query before running it! in big and bold on any sql-query-sending page?"

    Yes it would hurt. addslashes is actually the _wrong_ way to do things. It is bad design. But it is shameful that even up till now in PHP it's not clear what to use instead. pear db or pdo?

    Whatever it is, you should use a database specific quoting method.

    In perl if you have a db object $dbh you'd call it like this:
    $quoted_stuff=$dbh->quote($stufftoquote);

    However, you should usually use prepared statements and placeholders. You can do this in Perl, Java etc.

    Thing is, PHP should have done this a LONG time ago, instead of coming up with _stupid_ stuff like magic_quotes and addslashes, which makes it easy for people to do the _wrong_ thing quick.

    It's pretty annoying that PHP made it hard to do things _properly_.

    If the devs only talk/think about input filters it means they don't get it.

    Your program should have input filters so that _it_ can cope with data sent to it. But it should also have output filters tailored for each thing it talks to (e.g. DB, web browser, some other program), so that things are quoted and filtered properly and the destination programs can handle the data correctly.

    Magic quotes is bad design. Automatic input filtering with magic_quotes means that all data is quoted in the same way, for "nobody" in particular. That causes data corruption in many cases when the program submits data to itself. That's why you see stupid things like \\\' in some websites.

    So much of PHP is bad design that it isn't funny.

    I suspect that when you remove all the "convenient" PHPism that are bad design (global track vars, magic_quotes, addslashes, etc), you'd probably end up with stuff that's just as "hard" as Perl.

  2. Re:that's more like it on Company Develops Microwave-powered Water Heater · · Score: 1

    Yeah.

    Microwave water heaters for showering are stupid. If you want to save energy you should use heatpumps.

    Of course the other alternative is to have a cluster of watercooled P4 dual core machines around. Then you can use the cluster to do protein folding calculations or something and get nice hot water for your shower at the same time. So in a way all that energy is used and not wasted. ;).

    Hmm I think you might notice if someone killed all the processes while you were taking a shower...

  3. Re:AMD wins every result except... on The Mother of All CPU Charts · · Score: 1

    The chart says _memory_bandwidth_ somewhere. Go figure.

  4. Re:solution vs. problem? on Is There Too Much Enthusiasm Over Wireless? · · Score: 1

    Ah but you didn't use wires everywhere...

    You didn't wire up your child.

    If done properly your child wouldn't be able to pull laptops off tables... ;)

  5. Re:Run as a Non-admin User on Maintaining Windows XP System Performance? · · Score: 1

    BTW, you can even run your normal apps as a nonadmin user AND then for normal websites run IE as yet another nonadmin user (for important sites use a different account - just create different shortcuts, and change the colour scheme so you don't get confused).

    That way even if IE gets taken over, it's a fair bit harder for it to mess up data owned by your main nonadmin user. Maybe you lose bookmarks you didn't backup and some recently downloaded files.

    It'll take extra effort for someone to take over your system via your browser.

  6. Re:At some point, extra resolution is pointless on Refocusable Plenoptic Light-Field Photography · · Score: 1

    I believe if you make the pixels smaller they get more prone to noise.

    If you keep the pixels big and add more pixels, the array gets bigger (and more expensive).

    But yeah, I guess it'll still be cool.

    I wonder if that's how many insects see the world. Maybe the conventional wisdom is wrong about insects needing to be pretty close in order to see things in focus.

    I already find it hard to track some flying insects with my crappy mammalian eyes, but it seems dragonflies manage to do that pretty well.

  7. Re:More support for the Bible on Grass Grazing In Dinosaurs Confirmed · · Score: 1

    I believe in God, I believe he is the Creator and I believe evolution is more likely than stuff springing into existence in six consecutive 24 hour days. It would seem unlike his chosen style of operation for this universe[1], but whether or not I am right about that shouldn't be that important.

    However, I must say it is not wise to require people to believe in creationism in order to be a Christian. There are only a few requirements to be a Christian. One must not like those Pharisees Jesus rebuked for putting extra requirements and burdens on the rest of the people of Israel.

    [1] If it were his style that it is normal for things to occur "just like that", then why are people needed to spread the Gospel? He could very have things done instantly or over 6 days. But no, he has chosen to do things differently.

    When Jesus turned water into wine at the wedding, he could have just created wine jars full of wine out of nothing. But instead of that, he asked people to bring stone jars, fill them with water, and only then he turned the water into wine. He allowed people to participate in the working of the miracle.

    Same for when Jesus fed the thousands. There was a boy who donated his food first. Was that necessary? I guess not, if the objective is to just feed the _stomachs_ of the thousands. But maybe yes, if the objective is something else.

    Would an all powerful God really need us to do things for him? No. But in his grace and wisdom he has chosen to allow us to participate.

    I believe it is more likely that the 6 days of creation are figurative/symbolic.

    Lastly, if God really rested on the 7th day and "rested from all his work", and he is still working miracles and answering our prayers, then what "day" is it now? But don't forget - Jesus healed on the Sabbath (which is the 7th day), and the Pharisees rebuked Jesus for that. So which "day" is it now?

    I don't have an answer for that, but I think it's worth thinking about.

  8. Re:Few to no reasons to be concerned about the las on Laser Etching a Laptop · · Score: 1

    Well the versalaser stuff is now going for < USD8K

    http://www.versalaser.com/english/laser_systems/la ser_systems.html

    Old review:
    http://www.pcmag.com/article2/0,4149,1360231,00.as p

    I'm sure people have already been making money with it for years since it first came out. There's plenty you can do with such systems.

    Normal laser printers used to be really expensive and they were still economically viable.

  9. Re:More support for the Bible on Grass Grazing In Dinosaurs Confirmed · · Score: 3, Insightful

    Well I'm a christian, and I think that christians should focus on spreading a more important message, than spend too much time on rather debateable points, especially things that don't actually form the foundation of the Christian faith (e.g. Jesus).

    If you believe in the behemoth being a dinosaur in the long term it gains you very little even if it is true. Whereas the whole point of Christianity is that believing in Jesus gains you a lot.

    In all the hot air from the intelligent design, creationist, evolution parties, was there much really to do with Christianity? Did it help spread the Good News? Was it a blessing to other people?

    Instead of wasting so much time in debates like whether we are descended from apes or not, maybe we should ponder whether we really are behaving like God's children or not.

    Now if the debate was on whether Jesus died and was resurrected or not, that would be an important doctrinal and core issue, and one worth defending.

  10. Re:No, not for the coffeepot on How Things Will Change Under IPv6 · · Score: 1

    Once you have the TLD reserved properly then you can do this:

    At the global level the top level name servers if asked, resolve .here to a reserved IP say 128.0.0.1 (for example ok?).

    Anyone upstream from a client can choose to configure their routers to route 128.0.0.1 to their server.

    So if some place does not configure their access point, maybe you'd see their ISP's page when you visit .here, or maybe you'll see a Linksys ad ;).

    Whereas if a site is intentionally giving unrestricted (no redirection) free and open WiFi, you might see a page telling you about the terms and conditions etc.

    So instead of localhost you have a "localarea" domain and IP. Of course the .here domains don't necessarily need to point to the reserved IP. And for various reasons you might wish to redirect web browsers who visit http://here./ to a FQDN.

  11. Re:Yeah and do the math. on Curbing Energy Use In Appliances That Are Off · · Score: 1

    From the context I gather that 27kWh is electrical usage for a household. I doubt that includes transportation.

    If your usage is 11kWh a day, that's a difference of 16kWh. Can't be due to wall warts and devices that are switched off. Maybe you could give a more useful hint or two.

    My argument is that trying to save the 2.4kWh from wall warts and appliances that are nominally _off_ is especially stupid for them. They should focus on saving 5kWh or even 10kWh from the stuff that's _on_.

    My other statement is that a litre of petrol is 9kWh. Cars usually consume about 6-12 litres per 100km. Trying to save 2.4kWh/day? Just drive smoother (unless you have regenerative braking, you waste energy when you use your brakes) and try not to go much faster than cruising speeds.

    If your car uses 40 litres every 10 days that's 36kWh per day. Just a 10% improvement saves you 3.6kWh.

    If you have two cars that go to two different workplaces, that's double the energy usage.

    It'll take a lot more effort to get wall warts etc to go from 2.4kWh to a fraction.

  12. Yeah and do the math. on Curbing Energy Use In Appliances That Are Off · · Score: 0, Troll

    It costs money, time and _energy_ to make new devices or modify old ones to use less power.

    100w for 24 hours is = 2.4kWh. Oh wow. Pardon me if I find this whole thing rather silly or even stupid.

    1 litre of petrol is approx 9kWh. So if you drive about 3 to 4km (2 to 3 miles) on a typical car you'd use that much energy already. Imagine if you just decided to be a bit heavy on the accelerator one day whilst slightly late for an appointment, or have to go up a hill.

    If you can save that 2.4kWh/day from your wallwarts/vampires easily, sure do it. But if it takes a lot of effort, I think there are plenty of easier ways to save 2.4kWh/day.

    If you're in somewhere warm, use two airconditioners for an hour less each (or four for 30 minutes less), or put them on a higher temperature setting.

    If you're in some place cold, turn your heaters down and/or use your computers as heaters - run the protein folding thing - so at least you're doing something useful while generating heat ;).

    I think people should get their priorities in order. Rather than get worked up over low priority/impact stuff. Makes me wonder if politicians or someone is trying to distract people from more important stuff.

    I mean how many kilowatt hours does it already cost to get a single 70 ton battle tank to Iraq and how much to keep it running there? And even that is not as important as wtf are the US doing there in the first place, and how they ended up there. Sheesh.

  13. Re:Application tuning suggestions on Sun Announces Support for PostgreSQL · · Score: 1

    Yes, selects, joins, data integrity should be done on the DB.

    But the original poster was talking about having complex _PHP_ stored procedures to do stuff - see the last two paragraphs.

    Will that sort of thing work as well on slony etc?

    Often decent hardware is a lot more reliable and robust than most of the clustering systems I've encountered. So even though one is doing clustering for performance it's scary to me when it's for the DB - I'd rather have it on one powerful reliable box, not confident of the maturity of the systems out there. Clustering webservers is not a problem.

  14. Re:No, not for the coffeepot on How Things Will Change Under IPv6 · · Score: 1

    Yes that can work, but not everyone accepts dns searchpaths from externals.

    If we formally reserve .here, it can still work even if a site doesn't divert dns packets, and the client fetches the address from an upstream server. Because we can reserve an IP for *.here so that if no one else upstream answers for .here you will get that IP, and then devices upstream could answer - whether you get "OEM ROUTER default config" or "Welcome to Blah ISP" is a different matter.

    The company I work for provides an internet access system that even works most of the time if users have arbitrary static IPs and default gateways. So users don't even have to turn on DHCP to get internet access.

    I tried to get interest within my company about this TLD thing, but there's no short-term revenue in this.

  15. Not so good. on Sun Announces Support for PostgreSQL · · Score: 1

    "HOWEVER, you need to learn to spend more time programming your database... However, you will spend LESS time programming yours sites/applications... It's a tradeoff"

    That's fine if you just have a small site - one or a handful of servers.

    The trouble is webapp CPU is much cheaper than DB server CPU. You can very easily keep adding webappservers and hook them to your DB server.

    But AFAIK you can't add capacity as easily or cheaply to your DB server. Please do correct me if I'm wrong - give me links.

    Of course Sun will be happy to provide the 64 CPU 128GB single system image server for your database (with attached storage etc), if you end up needing it - which you might if you start running a lot of PHP in your database.

    So whilst I'm fine with doing stuff in the DB (esp to maintain data integrity), I don't think it's such a good idea to put so much processing in the DB, especially if the language doesn't perform that well (has PHP improved in speed significantly?).

  16. No, not for the coffeepot on How Things Will Change Under IPv6 · · Score: 1

    For that, use the .here domain.

    A coffeepot somewhere physically near you would then be coffeepot.here or something like that.

    Given we still live in the physical world it makes sense that we should have a reserved domain to address things that are within a location.

    So whichever place you go to, http://jukebox.here/ should always get you to a jukebox in the general vicinity (if there's one). and http://here/ will give you info about who is providing the network etc, and perhaps point you to other stuff in that area.

    I tried to get ICANN to reserve such a TLD (emailled a few of them), but I'm not rich and don't have USD50K to apply.

    Don't forget the whole idea is to then give the TLD to the world so people can use the TLD in a similar way they get to use the 192.168.x.x and 10.x.x.x and the 172.x.x.x addresses.

    So far ICANN is just interested in creating TLDs that are mostly practically "Yet Another .Com".

    Look up tldhere for more info.

  17. Well he had drive and managed to get money on Mad Scientist Invents Colored Bubbles · · Score: 2, Insightful

    True it was the Indian chemist who did the final version of the bubbles (quite impressive work too - managed to do it within a year). I think few chemists would be able to do that sort of thing.

    But this guy had the idea, AND the persistence, AND the luck to get the financing.

    Otherwise the Indian chemist might be doing other stuff rather than bubbles.

    So what if you're brilliant AND have the idea, if you can't get any money to pull the idea into reality, the idea just stays an idea.

    Or if you're brilliant, but you have no ideas in that particular field. While you might be able to think of millions of ways of creating dyes (which might impress chemists in other fields), but that's different from thinking of things that could impress kids and toy manufacturers.

    Without that particular team of people, there wouldn't be these coloured bubbles.

    And interesting dye tech too.

    Does it by absorbing light though.

    I wonder if they can make bubbles which have intense iridescent colours. While normal soap bubbles do already get colours from iridescence, they don't really have intense colours. You might be able to also have something that washes away easily or that is fairly transparent - after all it probably won't be a "normal" dye - it'll be thin layers of transparent refractory stuff.

  18. Re:Suckers, suckers everywhere on No More Lunar Land for Sale · · Score: 1

    Of course you don't.

    The difference is in your case you were trying to be nice/kind.

    I doubt the people trying to buy lunar land were trying to be nice.

    Anyway, if people stopped being nice because other people were nasty, the world would be a terrible place.

  19. Re:no software is bug free on ZDNet Talks to Kevin Mitnick · · Score: 1

    uh, if you can get sued for releasing buggy code, then how is making free software going to cover your costs?

    If people get used to the idea of suing if the software has bugs, you'll still get sued, even if your software is free.

  20. Re:Is the market really moving? on Unisys: We No Longer Have A Way Out · · Score: 1

    "But clean room space is very expensive, so someone had the bright idea of, well, we can connect more then one test fixture to a computer and save that space "

    Can't you just make the connections longer, put the computers outside the clean room and give each fixture its own computer (I'm assuming PC type hardware which is cheap)? If the speed of light is too slow for that, then odds are your computer would be too slow to handle multiple fixtures too.

    Anyway, your experience underlines how Software Engineering is different from Civil Engineering:

    With Civil Engineering, people can't sell/launch the plastic/clay models or the blueprints as production ready.

    Whereas with Software Engineering, they're often called version 1.0 ;).

    Other trouble is it costs about as much to make the plastic models as it does to make the "real thing".

    And if costs of copies are low, you should be making something new and unproven, instead of something already solved.

  21. Re:again, find an informed author!!! on Dual-Core Shoot Out - Intel vs. AMD · · Score: 1

    Buy at least two drives then. Put the system and data on one drive and the games/applications on another drive (shouldn't matter if you have to blow your games away and reinstall if things go wrong - just backup your saved game files - if the game does it right, it'll store the saved stuff in your home directory anyway).

  22. Re:compared to the top-of-the-line pentium on Dual-Core Shoot Out - Intel vs. AMD · · Score: 1

    Uh, we just bought Intel dual core systems for our dept.

    But we also got AMD dual cores systems too. It was the cheapest way to get "real" SMP systems of both architectures for testing stuff on. Plus 64 bit capable systems too.

    The Intel stuff is much cheaper - the low end CPUs are cheaper (we were going for cheap and decent), and the DDR2 RAM is significantly cheaper.

    Also, the Intel stuff is faster for the openssl symmetric crypto speed tests. But I guess the AMDs will be faster for almost everything else that's not in small tight loops :).

  23. Re:The best deal RIGHT NOW in processors on Dual-Core Shoot Out - Intel vs. AMD · · Score: 1

    You could do some research on when companies like to announce price changes.

    Then hopefully you can more likely avoid the "price drops the next day" effect.

    Just a few weeks ago we were going to get dual core CPUs (Intel and AMD)for our dept, I told my boss that sources (e.g. theinquirer.net) had indicated there would be price cuts end of October. But since time was an issue, we went ahead anyway.

    Sure enough there were price cuts, but turned out since we got the lowest end dual cores, we didn't really lose out by much. Waiting would have cost the company more in wasted time etc etc. The Intel dual core systems were much cheaper - the CPU was cheaper, DDR2 RAM was significantly cheaper.

    Anyway, looks like the D820 is faster than the X2 3800+ for symmetric crypto, but slower for public key crypto. I'm curious to find out which runs perl stuff faster :).

    Had probs getting onboard LAN and UDMA to work with SuSE 9.1. For the Athlon system updating to the latest SuSE 9.1 kernels got both working. However the forcedeth LAN driver seems to temporarily stop working on load, so had to get and compile+install the drivers from nvidia's site.

    One of my colleagues has temporarily given up getting SuSE 9.1. to work fully with the Intel 945 onboard stuff enabled (DMA, LAN) - he loaded up Ubuntu and it works (except he hasn't got SMP enabled ;) ). Got one-way gigabit LAN throughput between the Intel and AMD machines too, but did not manage to get full duplex gigabit :(.

  24. Enter? How about exit? on Fatal Flaw Weakens RFID Passports · · Score: 1

    I think the exiting part can also be a bit worrying...

    Or even the transiting.

    My uncle once had the "pleasure" of being on a flight that was to transit on US soil. Something happened and the passengers had to get off the plane (it was to be just a short stop and then the plane was to take off etc).

    Naturally he didn't have the visa and stuff to enter the USA, after all he wasn't intending to enter the USA, but still the US immigration people hassled him about that. This was even before the USA's 9/11.

    So things could probably be worse now.

    Might end up being sent to some Middle Eastern country or Cuba or even the US itself...

  25. Re:They're really going to hate it when... on Police Need 90 Days To Crack Hard Drives · · Score: 1

    You should just sell the old one on ebay :).

    If you do things right and are lucky, maybe people might even pay more for the novelty of getting a confiscated computer.