Slashdot Mirror


User: 1110110001

1110110001's activity in the archive.

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

Comments · 328

  1. Re:Real-world enterprise applications on The PHP Anthology - Volume II, 'Applications' · · Score: 1

    Normally all contants are written in uppercase. I guess you can tell why.

    b4n

  2. Re:Real-world enterprise applications on The PHP Anthology - Volume II, 'Applications' · · Score: 1

    You mean 200kB that are in shared memory because you use mmcache if you really care? BTW Smarty does translate everything to PHP. So actually you're using PHP as template language, when it comes to execution. But you've a little caching logic and some plug-ins that can help you if you know how to use it.

    b4n

  3. Re:Ugh on Why You Should Use XHTML · · Score: 1

    1) The default CSS in most browser display strong like b and em like i. If you forget to add something to your stylesheet.

    BTW opening and closing tag of strong means 10 letters more. So what? I don't care about typing more and it really doesn't matter if you got used to it.

    2) XHTML 1 Transitional still exist, HTML 4 too. Use it if you like to. It's still supported by your favorite browser. If there is a tag they don't know it gets ignored. If your browser supports XML you could even use XHTML 2 and convert it to XHTML 1 as example in the FAQs show.

    b4n

  4. Re:Ugh on Why You Should Use XHTML · · Score: 1

    and shouldn't be used any longer because they mean _b_old and _i_talic. This means their content should be bold or italic. Now they are called and and you have to choose how they should look like with your CSS. It's just a naming-thing.

    b4n

  5. Re:It looks good on PHP 5.0 Goes For Microsoft's ASP-dot-Net · · Score: 1

    After trying the Zend Studio you get the personal edition: http://www.zend.com/store/products/zend-studio-per sonal.php
    It's free and if you can live without having some features it's quite nice.

    However I like Editplus2 under Windows and like SubEthaEdit now with Mac OS X.

    b4n

  6. Re:Math Isn't A Sport: A Proof By Contradiction on Is Math A Sport? · · Score: 1

    But: I am a math nerd, and have never beaten anyone up (including myself or any another math nerd).

    Maybe you're just not a math nerd. You've to prove that you are to see if your conclusion is correct.

    b4n

  7. Re:If you want to check out XP SP2 RC2... on Microsoft Delays Windows XP Service Pack 2 · · Score: 1

    Does work with Firefox under Mac OS 10.3.4 - It tells me: Checking for the latest version of the Windows Update software...

    Depending on your connection speed, this might take a minute. During this time, you may receive one or more security warnings. Review each security warning to ensure that the content is signed by Microsoft, and then click Install or Yes to install the software.


    But nothing happens after that. Maybe my connection speed is just too slow.

    b4n

  8. Re:Watching a live slashdotting on Build Your Own FreeBSD-powered Motorcycle · · Score: 1

    It's not PHP. It's bad written PHP code not meant for high load. You could write such code in every language. BTW mmcache helps a lot if PHP is to slow for you.

    b4n

  9. Re:flamewar volley 1 on Searching for the Best Scripting Language · · Score: 1

    Looking at the perl examples it would could also be

    php -r 'echo "hello world\n";'

    Just to be sure everything is parsed. Sorry if a one-liner is not what you thought of when thinking of php as a web-scripting language. But hey .. Javascript is included too ...

    b4n

  10. Re:Using the right tool for the job on OpenGL in PHP · · Score: 1

    Use an other ini in your testing and development systems. Prepend the error string with alert(' and append with ') (which can be defined with php.ini). Or use your own error-handler which sends a Jabber message or whatever.

    Exception haven't been avaiable in PHP4 and it would only be usefull for warning or notice. I want them too, thus I agree with this point.

    b4n

  11. Re:Using the right tool for the job on OpenGL in PHP · · Score: 2, Informative

    Set error_reporting to E_ALL and you see when PHP has to decide something you haven't defined. When you set your stderr to /dev/null you won't see errors in most unix tools and they do "something else". PHP has a recommended configuration. Use it!

    b4n

  12. Re:Aren't they re-inventing the wheel? on FireFox and Longhorn: Meant For Each Other? · · Score: 1

    Actually is seems like a re-implementation. But ... Both are XML and we have XSLT and things - shouldn't it be easy to translate XAML to XUL or vice versa. They do the same, but call things differently.

    Anyone with enough details to this?

    b4n

  13. Re:IE Development is tough. on Making Things Easy Is Hard · · Score: 1

    If you develop bigger applications with a framework to put things together all of this integrated stuff don't work. Your only chance is a remote debugger (see the zend stuff for more).
    All we need is Editplus - a really nice editor. Haven't found something sweet like this ;)

    b4n

  14. Re:the wonders of PHP: on PeopleAggregator - An Open Source Social Network · · Score: 1

    And that's why sourceforge doesn't work. Oh it does .. Maybe PHP isn't that bad. Just because something isn't the way you know it doesn't mean it's bad.

    b4n

  15. Re:Fatal Error on Google Updates Its Face · · Score: 2, Informative

    You use HTTP to transmit your stylesheet. So the HTTP RFC helps.

    b4n

  16. Re:More ways to prevent people from doing their jo on Explaining Open Source Software · · Score: 1

    But the GPL isn't needed to use the software. If you don't unterstand the GPL you have some software as free as in beer. GPL is needed for (re-)distribution and modifing the sources.

    b4n

  17. Re:Ripping and Burning is Pro only on Winamp 2 + Winamp 3 = Winamp 5! · · Score: 1

    Take a look at this forum entry: Most Requested Features / Plug-ins

    At the bottom is a link to an Ogg encoder, which is IMHO the better format. Couldn't get iTunes to work with my ogg-files without freezing (not even speaking of ripping with iTunes to ogg ...)

    b4n

  18. Re:Direct link to trailer on Star Wreck Trailer · · Score: 1

    Of course speed does depend on your programming skills as well. You can make a very slow programm in C or a very fast one in PHP.

    I'd use Smarty and activate caching to speed the whole thing up. It's the same trick Slashdot uses and as most of the pages at Star Wreck almost never change this'd give it the needed boost.

    To make it even faster someone could use Turk MMCache. And than but the whole output of Smarty in the MMCache, which is in shared memory, and write a little resource handler for Smarty to use this.

    As we see it doesn't depend on PHP or Perl or Java or anything else. It's just about using the right tools for your chosen language.

    b4n

  19. Re:Fuck Yeah on iTunes Music Store - 'Coolest Invention of 2003' · · Score: 1

    Winamp 5 Beta 2 is avaible at http://download.freenet.de/archiv_w/winamp_5719.ht ml - or many other site: http://www.google.com/search?q=%22winamp%205%22%20 beta

    For the libary and videos winamp 2.9x can do the job for you. But Winamp 5 Beta 2 seems as stable as the normal version. And yes the alpha versions sucked. Thus if you need ripping and burning v5 beta 2, if not 2.91 is enough.

    b4n

  20. Re:Fuck Yeah on iTunes Music Store - 'Coolest Invention of 2003' · · Score: 1

    Winamp had a Libary since Winamp3. Winamp 2.9x has it too. It has views too (like the smart playlists).

    Currently I'm using Winamp 5 Beta 2, which is able to rip and burn CDs. I'm converting all my audio CDs to Ogg Vorbis with on CDDB data check and an additional click.

    I used iTunes for two days. I wasn't able to rip to Ogg Vorbis and while iTunes tried to read my other ogg-files it froze at startup until I deleted the whole libary.

    b4n

  21. Re:Its news to you on The Anatomy of Cross Site Scripting · · Score: 1

    In php, htmlentities doesn't encode the '

    With ENT_QUOTES it does escape both. Take a look in http://php.net/htmlentities - that's unterstanding the system you use .... Same with htmlspecialchars().

    addslashes() isn't that great if you plan to use an other DBMS in the future. For everything bigger than a hack ADODb is a good choices, which offers the method qstr() - http://php.weblogs.com/ADODB

    b4n

  22. Re:Finally on Phillip Greenspun: Java == SUV · · Score: 1
    I'm working on a similar big project. I've written the core and designed how the different parts should look like (include coding standards, which are similar to the PEAR ones). I did this with the help of a Java freak, so if he is satisfied it should be fine ;)

    Problem: PHP (and most other languages) encourages UI code to be interspersed with application logic.
    Solution: Enforce a separation between UI, application code and external data sources (i.e. three tiered application design).


    Smarty is a really good solution for this (http://smarty.php.net/). I used it all the time.

    Problem: No strongly typed vars
    Solution: Public class vars and global vars must have their type appended to their name (ex $memberNameStr)


    Have to disagree here. I use asserts instead. I.e. a function looks like this:
    function foobar($id)
    {
    assert(is_numeric($id));
    }
    The big advantage is that you get a warning. And you could remove all asserts before putting the whole thing live.

    An other thing that can be done is a checking script in CVS. So no one is able to checkin a $foo = new Foobar; echo $foo->_baz;

    Anyway - we're already a bit OT ;)

    b4n
  23. Re:Finally on Phillip Greenspun: Java == SUV · · Score: 1
    I don't see a problem with types in PHP. Most of your time you're working with HTTP and HTML in PHP. Both have no types either. If you don't know the type of a variable it's most likely you didn't check its value. Remeber: Always check your inputs. You can't trust anything you get from the user. If you have an id do:
    $id = 0;
    if(is_numeric($_GET['id'])) {
    $id = $_GET['id'];
    }
    You see? I've initialized $id and made sure it's an integer. If $id is used (not as leftside operator) you get a warning. Turn error_reporting on while developing (I mean E_ALL so you get all warnings and notices).

    b4n
  24. Re:Finally on Phillip Greenspun: Java == SUV · · Score: 1

    After having went through several maintenance and change cycles, obviously the programmers of that application had obviously lost track of when something is supposed to be a string and when it's supposed to be a value. The fact that in PHP if (x == 0) is true when x is "", or for that matter when X equals "OTHER", didn't help either.

    Just because any unskilled burger-flipper could quickly throw together a 3 page site in PHP, doesn't mean they have _any_ clue how to make a complex enterprise system, that can also be maintained and extended later.

    You've something in common with the burger-flipper: You don't read documentation or don't unterstand it. PHP is very well documented. See http://at.php.net/manual/en/language.operators.com parison.php and http://at.php.net/manual/en/types.comparisons.php and solve your problems. As you can see PHP has two operators for testing if two terms are equal. === and !== are the strict ones you need. Next time learn the language before using it.

    b4n

  25. Re:The code is the data! on PHP Usage in the Enterprise · · Score: 1
    * Type handling is a nightmare, sure, they make it real easy for the newbies to use numbers-in-strings as numbers, but when you're not a newbie, you begin to run into issues where it's expecting you to be stupid and as a result ends up being stupid itself, and causing you to write disgusting checks just to make sure things are sane.

    PHP communicates via HTTP and outputs HTML (not always but most of the time). Both have one type which is string. Types are a extra candy in PHP. Anyway. When you do your checks on input data its not problem. A really short example is:
    $id = 0;
    if(is_numeric($_GET['id'])) {
    $id = $_GET['id'];
    }

    if($id) {
    // do your stuff like SELECT ... WHERE id = $id, which is safe, as id is always an interger
    }
    Put your application parts in classes and let a framework call them and things like that and coding and maintaince is as easy as with a Java based solution. I should know. I wrote such a framework and made the design with a java-freak ;)

    b4n