Jump to content

Nameless12

Members
  • Posts

    244
  • Joined

  • Last visited

    Never

Everything posted by Nameless12

  1. Just a quick comment on the browser wars, both browsers have merits the thing i hate about IE and Microsoft is that all browsers would conform to the same standards in a perfect world but  Microsoft just has to go do stuff their own way.. Dont forget there is a world beyond firefox and ie, opera is quite nice.
  2. Yes it is. <?php foreach (array('one', 'two')) { echo 'a'; } ?> creates the following error <b>Parse error</b>:  syntax error, unexpected ')' in <b>PHPDocument2</b> on line <b>2</b><br /> not to mention the fact it shows up as invalid code in zendStudio and I have never seen any documentation showing it with out the as statement stated before
  3. You are doing it wrong foreach ($array_or_object as $value) {     echo $value; } or alternatively foreach ($array_or_object as $key => $value) {     echo $key . ': ' . $value; } you were forgetting the AS portion
  4. If i understand correctly you really just want a way to debug your framework that is effective??? Registry()->debug() Config()->debug() Db()->debug() Error()->debug() Dir()->debug() An error object that is stored in a registry also makes life easier Edit:: this is probably not what you are looking for as its more simpler than what you originally stated but I think what you originally stated is overkill. The above is the kind of approach I used in my framework
  5. [quote author=wildteen88 link=topic=124015.msg513454#msg513454 date=1169755493] You cannot run .php files by "double clicking" them, like you can with .html or .exe files for example. You have to move it to you servers document root and then go to http://localhost/ to run the php file. PHP is a server side programming language and thus requires to be run in a server setup. Or you can run then via the command line. You can install Apache (the server) and PHP on your PC locally. Read [url=http://www.phpfreaks.com/forums/index.php/topic,120152.msg492660.html#msg492660]this[/url] post of mine to do so. Or you can go the lazy root and install one of those horrid all-in-one installations over at wampserver.com or xampp.com [/quote] that is not true. php comes with an executable that can execute php files
  6. [quote author=Crayon Violent link=topic=124424.msg516261#msg516261 date=1170095211] So you're going to give up on WAMP, just like that?  So what happens if you have issues installing Xampp?  Are you gonna go find something else?  If you don't take the time to figure out what is wrong and fix it, you will never learn anything. You wonder why people get frustrated with you.  Well that's why, right there.  People offer advice and try to help, and you casually push it to the side, without even making an effort.  Now you can argue that you are making an effort.  You can argue that you spent hours, days, weeks on it.  But I refuse to believe that you are making a serious effort...unless you just aren't capable of doing it.  Are you not capable of doing it? [/quote] So you are telling him to go and learn WAMP?? that is the dumbest idea I have heard. People use WAMP and things like it because they require no effort to setup. It is stupid to learn WAMP and if you wanted to tell him to learn something tell him to start learning apache\php\sql administration but that said, administration and programming are different jobs for a good reason.....
  7. you say "this is as far as the dicussion goes", but to me it ended a long time ago. I would not be saying this if not for your last post, but a good application does not mean the language it was made in is good. And I am not saying this to say php sucks, just because I think your argument is kind of empty. The quality of complete applications and the quality of a language are two completely different subjects You read what i said wrong. when I said the php guys are nothing compared to the guys in #cpp I was talking about the fact they are wankers not in terms of skill
  8. display_errors = On ^ ^ ^ cut and paste from your php.ini I dont know much about wamp and how they configured it. I actually configured my windows and linux servers myself but if you want a quick fix have you thought about giving xampp a try? Xampp can be a bit bloated but i always found it to be very reliable.
  9. [quote author=redbullmarky link=topic=123286.msg515376#msg515376 date=1169990115] Yahoo and YouTube have more than proven that PHP is a competent language enough. It's not like they're short of a few bob to invest in ASP/JSP/etc if they wanted... The whole ASP/PHP argument doesnt wash with me. It normally always ends up in a Noobs vs Experts, Quality vs Price argument. My personal view: PHP/JSP/CF/ASP, etc are all FAR more powerful than their output (ie, HTML which is a fairly simple set of tags comparitively) - so which is more powerful can be considered a fairly floored argument, as there's not really anything one language can do that another cant. It all boils down to taste. Personally, I find many hardcore ASP/ASP.net coders quite snooty about PHP - you only have to look many of the responses you see aimed at ASP newbs and that's not the sort of help/community I want to be part of. Generalising? Maybe. But that's my opinion. [/quote] I think what you described is to do with programmers in general not programmers of a specific language. Have you been to ##php on freenode?? the people there are so anal and a bunch of wankers. I have been told before that the guys on ##php are nothing compared to the people in the cpp channels.. somehow i think they may just have a point.
  10. By default php5.20 turns off displaying errors. I am not sure if WAMP has changed this or not. Check your php.ini file and turn displaying errors back on, i bet you are getting an error that is not shown for this reason.
  11. I don't mean to hijack this guys thread but he has not pasted his code yet and I was thinking doing this earlier today but thought my time would be better spent elsewhere, I finally did it and here is the result [code] <?php function is_email($email) { $size = strlen($email); $explode = explode('@', $email); if (sizeof($explode) == 2) { if (strstr($explode[1], '.')) { $end = explode('.', $explode[1]); $domain = $end[0]; $end = $end[1]; if ($end > 5) return false; } for ($n = 0; $n < $size; ++$n) { if ($email[$n] == '/'  || $email[$n] == '\\' || $email[$n] == ';'  || $email[$n] == '#'  || $email[$n] == '"'  || $email[$n] == "'"  || $email[$n] == '!'  || $email[$n] == '%'  || $email[$n] == '^'  || $email[$n] == '*'  || $email[$n] == '('  || $email[$n] == ')'  || $email[$n] == '{'  || $email[$n] == '}'  || $email[$n] == '+'  || $email[$n] == '~'  || $email[$n] == '?'  || $email[$n] == '&'  || $email[$n] == '<'  || $email[$n] == '>'  || $email[$n] == ','  || $email[$n] == '`'  || $email[$n] == "\n" ||     $email[$n] == "\t" ||     $email[$n] == "\r")     return false; } if (strlen($domain) > 2 && strlen($explode[0]) > 2) return true; }     return false; } ?> [/code] what did i learn from this?? that i will continue to use regex unless I feel like making it a php c extension. Anyway izanto post your code when you get around to it i would like to see how you did yours.
  12. [quote author=Crayon Violent link=topic=123688.msg514818#msg514818 date=1169918917] So nameless, to sum up your thoughts, basically what you are saying is that until you can bust out good code, you are a beginner.  Is that right? If not, please clarify, because several people (myself included) have tried to explain that "good" is just some arbitrary term when it comes to coding, and that whether it is "good" or not is largely determined by the circumstance at hand.  It seems to me that you fail to really understand that.  Or at least, agree/accept that.  Do you happen to have some hard and fast rule to determine whether code is "good enough" or not, irrespective of circumstance? If so, I would be most interested in hearing/discussing it. [/quote] I am saying that beginners are more likely to not know the complete language and  zero design patterns resulting in beginners working around what they dont know in a way that creates an application that works, but in a way that the application is unmaintainable and insecure and poorly coded. The more people learn the less they work around what they don't know, and by doing this they are able to create better applications and plan ahead in their designs in a way a beginner cannot.
  13. it works just fine on my system, it is a very nice bit of software. I dont think the application is compiled for a 64 bit processor though but 32bit is just fine.
  14. [quote author=Crayon Violent link=topic=123286.msg514809#msg514809 date=1169917711] To clarify though,  I disagree with the notion that that makes PHP a "noob" programming language, where people would step up to "bigger and better" languages eventually.  It is not some simple, poor quality language.  [/quote] I didnt say php is a noob language just that the majority of people that use it are self taught and most of these self taught people are less likely to become experts. (i myself am self taught) Php is a less mature language than many others though on a technical level as it is the new kid on the block and has many quicks and lacks namespaces but at the same time the lack of namespaces makes the language easier for beginners to grasp. and yes 95% of servers run php4 5% run php5, what does that say to you? and last time i checked there were less than 2000 zend certified enginiers. Beginners flock to php, that is a fact. This does not mean the language is useless or that there aren't any really good php programmers out there, just that beginners flock to php and so the experts are an extreme minority. There is not a lot I can say to argue my case other than this so I wont continue to argue it. I do believe what I am saying can be proven by statistics as well because most of the other languages are taught in uni's and phpers are more likely to be self taught and learn via tutorials that are written by people closer to beginner\intermediate than expert level. There is a reason business prefers to hire people that program in java or microsofts languages and why phpers tend to be freelancers.
  15. About the statement "anyone can figure out the solution", It depends on the type of programming. Anyone can make a forum, anyone can make a blog and anyone can make a cms. When it comes to the things php does anyone can pretty much sit down and get results. When I was a beginner I sat down and said, I am going to make a forum. A few days\week later I had a working forum. It was poorly coded and unmaintainable at the time I did not know the complete php language and it really showed. But I was a result oriented beginner just trying to get it to work "like all beginners out there", and I got the result I wanted, that being something that worked. When I refer to beginners hacking away at the keyboard or anyone being able to do it I am referring to things like this. About the argument of there is no right way I agree, there is no right way to do it BUT there ARE wrong ways to do it. I just had another glance at your post and you said there are some things beginners get stuck on for days and weeks and in some ways I agree, some people are going to have problems putting things into context in a way that confuses them. It happened to me in many ways, but I got over it. This is not the kind of thing I am referring to when I say people can sit down and bash away. There are ways to work around a lack of knowledge and this is why I think beginners are capable of getting results and thats what beginners are usually after, and why the results the beginner gets work they are programmed in what I call the bash away at the keyboard till it works approach. I get the feeling we have been referring to 2 different yet similar things.
  16. that statement i said is so obviously true that I wont even both to defend it. It may be bold but it is true the statistics back me up on this.
  17. HmailServer looks like what I need, I dont need anything advanced and if I do it would be for linux not Windows. HMail looks very very quite nice, thanks
  18. does anyone know a good one?? At the moment the computer I use for development is running winXP64 so that rules out using postfix, any ideas?
  19. as you said non-technical people have no patience, and non-technical people are not experts. What I said was an observation that I believe to be true, I have nothing against people choosing not to specialize in a specific area as long as they don't pretend to be something they are not when looking for work in that area they are not experienced with. When people look for work in a specific area I have a higher standard for them to meet. But if they are just doing it for them self and are not technical, I do not hold it against them but at the same time I see them for what they are, that being beginners or maybe beginners going into the intermediate level. Everyone starts off by hacking away at the keyboard till they get something that works, a lot of my view on this area has been from looking back at some of the code i wrote as a beginner and seeing similarities in my own beginner code and other beginners. Everyone starts somewhere.
  20. lol the sad part is i have seen much worse.
  21. your quickquote.php is way way to long split the data and put it on multiple pages also the grey textarea\input background does not look right Also i clicked your xhtml validated link at the bottom of the page you have 72 xhtml validation errors most of them are to do with the form on quickquote.php I think.
  22. Yes but you just admitted to being new in that post of yours soo.. it kind of applies to what I am saying. It is hard to put it into words what I mean its one of those things where once you reach a certain level it is just obvious. In your case you are starting out and hacking away and then saying how can i make this better. With more experienced programmers they have coded it many times before, so when they go to start programming it they can say "how can i make this better" BEFORE they even start coding and this has a lot of advantages.
  23. You should never use the @ sign its best to avoid errors than silence them. Jagguy:: the & symbol is a bitwise operator.
  24. [quote author=obsidian link=topic=123688.msg514272#msg514272 date=1169842536] [i]It's really hard to answer that, because what's the definition of a good coder? Is it someone that can figure out a way to solve a problem or the person that knows the manual forward and backward? Based on my lack of training, I'd have to say that my actual [b]knowledge[/b] of the subject is lacking, therefore, I'd probably give myself a 3; however, if we're talking about the ability to solve problems, I'd probably have to bump it up a notch because when I'm given a problem, I'll figure out a way to get it done. It may not be the prettiest solution in the world, but I won't give up until I have something that works.[/i] [/quote] It is easy to figure out problems, "getting it to work" is never the best solution. I find beginners tend to want stuff to just work. There are two types of problem solving 1. the right way 2. hacking away at the keyboard until it works <-- beginner way
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.