Slashdot Mirror


User: tehshen

tehshen's activity in the archive.

Stories
0
Comments
564
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 564

  1. Re:New features on A Visual Walkthrough of New Features in Vim 7.0 · · Score: 4, Informative
  2. Re:There ARE other scriping languages besides PHP on PostgreSQL Slammed by PHP Creator · · Score: 1
    PHP takes care to keep things consistent

    You have no idea what you're talking about, do you?

    Take a look at the string functions. We have str_replace and strtr. htmlentities and html_entity_decode. Inconsistent underscores. bin2hex and strtolower, they can't decide whether to use 2 or to. Why do some functions begin with "str" and others don't? I'm not using C.

    Oh, and I keep getting the arguments mixed up. explode and implode seem backwards. strstr is (haystack, needle); preg_match is (needle, haystack). Why?

    May I go on? I can go on.

    PHP is the opposite of consistent. Whenever I program PHP, I have to keep a window with the docs open, because I keep having to look up if it's stripslashes or strip_slashes or whatever. Terrible.
  3. Hmmm... on CoD 2 Hits 1 Million Sold · · Score: 1

    Those figures look a little fishy :)

  4. Re:.* is bad? on Mastering Regular Expressions · · Score: 1

    It's because some people didn't know about the greedy thing.

    The greedy thing goes thus: If you have a string like %{"Attack of the Bacon Robots" is better than "Pride and Prejudice"}, and you want to extract whatever's inside the quotes, the obvious thing for regex younglings to do is to use one like /"(.*)"/. Starts with a quote, stuff in the middle, ends with a quote.

    This is expected to catch "Attack of the Bacon Robots"; but because * is greedy, it eats up the entire string, all the way from Attack to Prejudice. Dot star is bad because the greedy thing bites people.

    The proper solution is, I think, /"([^"]*)"/.

  5. Re:Funny how fast they are on screwing the custome on DRM Hole Sets Patch Speed Record For Microsoft · · Score: 1

    They could be waiting until this patch still gets, and then putting out another (securer) patch after ignoring it for a month.

    "See, we put out a patch after three days, and just look how insecure it is! Obviously we should test for weeks on end before sending out patches in the future." they could say.

  6. Re:Emacs on What is the Ultimate Linux Development Environment? · · Score: 1

    whoopsie daisy, I meant C-S- and . Preview...

  7. Re:Emacs on What is the Ultimate Linux Development Environment? · · Score: 1
    Avoid the X version of emacs.


    I know a few all-terminal hackers, but I don't understand what people have against X. When I use emacs -nw, I lose mouse support, I lose some of my shortcuts (I use C-S- and for resizing windows) and all the fancy fonts and colours and bolds and italicses.

    Sure, I lose the ability to use it with screen, but more and more of my stuff is becoming absorbed into emacs anyway...
  8. Re:Are you retarded? on PS3 Performance Downgraded Again · · Score: 1
    Many lower-budget PS2 games simply look terrible.

    I don't think you have to qualify it for the PS2 there... Many lower-budget games for anything would look terrible.
  9. Re:The appropriate punishment... on AOL CTO Shown the Door · · Score: 1

    657427 i have got mail
    657427 keyword advertising profits
    657427 building a keywords list
    657427 building a keywords list -illegal
    657427 building a keywords list -legal
    657427 keywords research purposes
    657427 value of keywords list
    657427 value of keywords list -greed
    657427 do aol users care about privacy
    657427 is screwup a good term
    657427 how to get lawyers
    657427 lawyers the pirate bay
    657427 lawyers the pirate bay -sco
    657427 poop
    657427 me too

  10. Re:One step closer... on Writely.com Beta - Google's Answer to Word · · Score: 1

    I am sure that Google would like to sell you a server that holds all your documents and stuff locally while serving Writely and Whatever That Spreadsheets Thing Is Called. Probably whenever it comes out of beta.

  11. Re:Installed != Used on 68% of UK Universities and Colleges Use Firefox · · Score: 1

    When I was at school, I couldn't get Firefox to work correctly by installing it myself, partly because we were all Limited Users, partly because of the bizarre way our home directories were named. If Firefox wasn't installed, I'd've had to use IE instead.

    Installed = better

  12. Re:specious defillibrator on New Kind of Spam 'Un-Training' Filters? · · Score: 1

    I'm sure that anyone clever enough to implement a Bayesian spam filter is also clever enough to tell ham from spam.

    This new tactic isn't going to result in any more sales from spam - it's just going to annoy people.

  13. Re:Road Construction on Japan Plans a Moonbase by 2030 · · Score: 0

    They'd better hurry up - it's only 1655 now! :)

  14. Re:Data Recovery Specialist on UK ISP PlusNet Accidentally Deletes 700GB of Email · · Score: 2, Funny

    I love it how that Reg article has a big advert in the middle asking "Do you have too much information?"

    How very apt

  15. Linux is not ready for the desktop on The Future of Closed Source Software and Linux · · Score: 2, Interesting

    It's not our problem, though - the desktop sucks. It's full of stupid people who are scared at the thought of thing new or different from what they're used to, people with no common sense who bury their heads in the sand whenever something goes wrong, people used to the released-software model where anything not in a shiny shrink-wrapped box is no good.

    You say you sit in chatrooms trying to help people. You should know that.

    Heck, the guy in the article was complaining that Evolution doesn't work like Outlook. Well, yeah. I think that's a good thing, as I don't like Outlook, but he's too narrow-minded (or possibly prejudiced) and thinks that Evolution is bad because it's different.

    The obvious fix to this "problem", to stop people complaining, is to give them something that they're used to. And to do that, Linux would have to be more like Windows.

    I'll say that again, if you're just skimming and didn't catch it: To make Linux ready for the desktop, it would have to be more like Windows - that is, worse.

    I've had people say that Emacs sucks because it uses funny combinations like C-x C-s and C-c. I mean, why can't it just use normal shortcuts, like Word does? I for one cringe when C-w closes a window instead of deleting a word, and M-t doesn't swap words instead of doing whatever the hell it does in Word (opens the Tools menu?) and think that C-k is far too important to waste on a stupid function like adding a hyperlink, but I'm not part of the different-is-bad crowd.

    These same people throw up their arms and complain when OpenOffice doesn't do things the same way as Word, or The GIMP doesn't do things the same way as Photoshop. It's not a case of unlearning the old way and learning the new, it's flat-out refusing to do anything. There's more of a case for OpenOffice than The GIMP here, but Microsoft Office isn't the epitome of good user interface design, and OpenOffice is allowed to change things for the better here and there. (Soooo many toolbars)

    Linux doesn't "need" anything. Linux won't "die" if it doesn't support the "killer aps". I don't use Flash or Photoshop or Office or any of those things. Oh no, I must be dead.

    I'm going to agree with your point here, but possibly not for the reasons you imagined. To all the fanatics and fanboys, Linux will not be on the consumer's desktop for a long time. It's intrinsic. Linux won't become popular unless it's more like Windows, and becoming more like Windows is not a direction I want it to go in.

    Linux has, however, reached a point where anyone self-determined can download Linux, install it, and use it with a minimum of fuss. There might be problems on the way, and things might be a little bit different, but if someone is clever enough to install Linux then they're unlikely to be swayed by things like that.

    That's far from "dead".

  16. Re:Stockpiling prior art? on Blackboard Patenting Educational Groupware · · Score: 2, Insightful

    Sounds nice, but then both parties would drag the case on for as long as they can, because they get more money that way, leaving the actual case going nowhere.

  17. Re:I hate PHP. on Extending and Embedding PHP · · Score: 1

    No compatibility issues when you stop using it :)

  18. I hate PHP. on Extending and Embedding PHP · · Score: 1

    Many people just use PHP because it's popular and because they can't be bothered to use anything else. Which is a shame, because it doesn't deserve to be, and many people should be much better than that.

    I remember when I picked up PHP. It was brilliant. Look at me, I can create dynamic web pages! I could do for loops, and while loops, and print out numbers without using JavaScript! And now, I can take parameters in from $_GET[], and make a proper website in only one file! :D! I got a website with Tripod (urgh) and that gave me a MySQL database, so I could now make proper sites! PHP was brilliant, and I was excellent with it. Wow, I was on top of the world.

    Seriously, I was ecstatic like that, but bear in mind that I only knew C and HTML before this. Oh, and BASIC, but that's just embarrassing.

    We were happy, PHP and I. We were nice and friends. Why should I bother to learn something else when PHP was accomplishing what I wanted just fine, thank you very much?

    Well, I can now safely say that dumping PHP was a great step forward for... pretty much everything really.

    I was so happy with what I was doing that I was willing to see past PHP's shortcomings. It was easy to learn, so I learned it and stuck with it. But PHP has a lot of shortcomings. Sure, I don't see why it's stripslashes() but strip_tags(), the underscore's being there is just random, but it's OK, I could just look it up.

    I didn't realise how slow I was coding, from all that looking at the docs.

    These days, I can look at PHP and go "what the hell were they thinking?". While it's alright to look at the documentation when you're learning a language, it's not right if I keep having to look at them several years later, to find out if it's array_length() or arraylength() or arrlen() or count(). It's count(). I relied on magic quotes to do all my work for me, when now I see them as a clutch, a poor clutch at that, and now I use taint checking. I draw circles and bang my head on them when I realise there's STILL no namespaces. I laugh at all PHP's inconsistencies, wondering why it's strtolower but str_replace and bin2hex, wondering why it's $haystack, $needle arguments and other times $needle, $haystack. The PHP devs must talk to each other as much as the Slashdot editors do (ooh, low blow).

    Seriously, PHP is so bad it's silly - there's just no reason for people to use it when there's far better out there. I don't have to talk about PHP's typing, or its syntax, as they can be dismissed as just a personal preference. I just don't understand why it's so inconsistent. A good language shouldn't be inconsistent.

    (Oh, and I don't see what's so special about the PHP docs either. Sure, it's nice that they're there, but pydoc and perldoc and ri beat them any day)

    So, I'm totally over PHP now. Totally. I learned Ruby, but you might want to learn Python, or maybe Perl. Maybe more than one. They all have good CGI support, and can do all that PHP can do, and more, better. Ruby's greatly improved my hacking ability, and dumping PHP can improve yours too.

  19. Re:Feature creep? on JavaScript Malware Open The Door to the Intranet · · Score: 1
    Whatever happened to the concept of simply doing one thing well?

    It was superseded by the concept of doing two things well.
  20. Re:Does anybody care? on Happy System Administrator Appreciation Day! · · Score: 1

    Who cares? It's just a bit of fun.

  21. Re:2 Button Mouse? on Linux Laptop from R Cubed Reviewed · · Score: 1

    Oh come on, *real* hackers don't ever leave the keyboard.

  22. PHP: Get over it on Pro PHP Security · · Score: 1

    Many people just use PHP because it's popular and because they can't be bothered to use anything else. Which is a shame, because it doesn't deserve to be, and many people should be much better than that.

    I remember (ah, memories) when I discovered PHP. I thought it was brilliant. I could write dynamic web pages! Wow! I had variables, and for loops, and while loops, and all sorts. It was amazing! Then I got a database up and running, and could actually make a site, o frabjous day, calloo, callay! This was back when PHP was all I knew, apart from BASIC, which isn't saying much.

    I was so impressed with what I could be doing with PHP that I overlooked all the things I didn't like. I didn't understand why the function naming was so inconsistent. Why sometimes my program couldn't see its variables. Heck, I was using hosting from Lycos Tripod, which was a complete pile of gibs, but it was worth it 'cause I could make dynamic web sites, and it was good.

    We were happy, PHP and I. Why should I go and learn another language when PHP was accomplishing what I wanted just fine, thanks?

    The answer is that I was lazy. Yes, I'm admitting that I was a big lazy fat-ass, to use a stupid term. I couldn't be bothered to learn another language, even though there were plenty out there. I thought that PHP was the best language there was. In the end, though, I gave in and dabbled in Python and Ruby, then gave up and went back to PHP again, then really gave in this time and went to Ruby for web development. (Then Rails came along... which was nice, though I'm not fond)

    These days, I look at PHP and go "bleh". While it was alright to keep looking at the docs when I was learning the language, it's not right if I keep having to look at them several years later to find out what function to use. I look at some of the 'features' and wonder what the hell they were thinking. PHP is so inconsistent that I wonder if the coders talked to each other as much as the Slashdot editors do. (By the way, I don't see what's so special about the PHP docs. Sure, it's nice that they exist, but pydoc and perldoc and ri beat them any day)

    Y'see, I'm done with PHP now. While it was nice of it to help me get started on web programming, I realised that it wasn't the only thing out there, and learning Ruby has improved my hacking ability by great amounts.

    Even if you're 100% in love with PHP right now, please take the time to learn something else. Python and Ruby are popular for the right reasons these days. It doesn't matter what you learn: toss a coin, use what your favourite Slashdotter uses; they're both better than PHP and can both be used to make web sites with. Maybe you'll like one of them. They'll teach you new ways of doing things, and make you question the old ways, such as why you have to use for loops instead of iterating over a range. If not, learn one anyway. It'll do you good.

  23. Re:Prosecute virus creating companies. on Banner Ad on Myspace Serves Adware to 1 Million · · Score: 5, Insightful

    Who can take a company/site serious when they are (through their ads) trying to outright scam their customers?

    This works for the same reason that spam works - it's cheap to do, and only a few stupid people need to click on the ads for them to be making money again.

  24. Re:Le sigh. on Dvorak Rants on CSS · · Score: 1

    Even if those percentages are correct - which I highly doubt - the percentage of the CSS standards followed doesn't give you the number of pages displayed correctly. For example, the rules that dictate text colour or position are going to be used more often than, say, inline images or selectors (which is why we get tests like Acid2 to test the rarely-implemented stuff).

    Also I like to mention conditional CSS in IE, which is probably the only nonstandard feature in IE that's useful.

  25. Re:Opera's UI is slick? on Browser Comparison - Firefox 2 b1, IE7 b3, Opera 9 · · Score: 3, Interesting

    I'm with you here. I'd use Opera much more if it actually looked like the desktop environment it runs under.