-
Posts
571 -
Joined
-
Last visited
Everything posted by Anti-Moronic
-
Questions a website owner would need answered via critique
Anti-Moronic replied to brown2005's topic in Miscellaneous
Depends from what perspective. Do you mean like by users? -
Hi, I have a client who owns quite a large website built with Drupal. It has maybe 3 or 4 major modules (classifieds, some social aspects, payment system setup). She now wants to extend the website, redo the whole thing and we're discussing whether it would be a good idea to continue to use Drupal, or move over to a custom framework. My argument was that Zend or a custom built app would be less overhead than Drupal, which has more features than she needs. Any thoughts? Should I mash up this Drupal app or rebuild? My only concern would be the work involved in rebuilding weighed against the *actual* benefits of porting to something more custom. For arguments sake, let's say I am equally competent in both Drupal and Zend.
-
I can't find little phone / fax number icons!
Anti-Moronic replied to tibberous's topic in Miscellaneous
..and bare in mind they're mostly copyrighted! Make sure they're free to use. -
Trust me, do this stuff first! PHP is childs play compared to effective database design. 'Normalisation' is wholly encouraged so get used to managing lots of table dependencies in the future. The most immediate problem with using username here as a kind of foreign key is that if you change the username, you now how to change the username in the child tables. It's horrible design. Use the user_id. You might want to use the other visual aids workbench has to better design and visualize the database and relationships. I'd definitely advise you look into JOIN queries and such, and put together a small database - maybe 5 tables all holding a relationship - and practice with that. Jump into the deep end and take a look at osCommerce or ZenCart. Buy a sql book and a book about database design.
-
I'll echo the post above - the Zend Framework setup is pretty easy to layout when you get used to it. However, even in this people tend to use different structures, not even sure convention is what ZF use in documentation on their website. Seen all kind of structures. Another thing as mentioned above, it is good practice to have your 'core' application outside the http root. Only include 'assets',images,js,css etc available via http.
-
From PHP >> C# or Python?
Anti-Moronic replied to Anti-Moronic's topic in Other Programming Languages
Very good points thorpe, thanks! I think enjoyment, passion for what I'm doing, should come first. I can tell you after looking into IIS and windows as a server it doesn't look even close to 'friendly', or at least what I'm used to working with. Thanks Nightslyr! Appreciate it. Some really good advice there, I'm looking forward to digging my teeth into both C# and Python, but not so much the windows server environment :S -
str_replace('http://', '')
-
A better redirect instead of header("")
Anti-Moronic replied to President Obama's topic in PHP Coding Help
..and while doing things like this try to remember accessibility. Have a fallback in case people don't have javascript enabled. As a major benefit, consider a complex filter/sort page which lends itself to being filtered and sorted by nature (like an online store). Using ajax, this entire process can be contained in a single page view without any refresh. Adds to a very seamless user experience. I really think ajax will be used on almost every website in the future. Gives you that 'desktop application' feeling. -
To be honest, I think he's beyond help. I can virtually hear his moronic drivel through the forum. No way at all you have been programming for 4 years. Not possible unless by programming in php you mean: echo "<style>.yaybox{float:left}</style>"; echo "<div class='yaybox'>float me baby</div>"; echo "<script>alert('WAIT! Stop thinking this is programming in php, you're about to waste 4 years on this crap!');</script>";
-
HAHAHAHAHA I've had well paying clients demanding less than you!! Seriously matey, go to a freelance board and pay somebody to do this for you. Stop trying to be a programmer, you're not one - you're an obnoxious, i-am-entitled-to-everything pig. Get over yourself and find another industry because this one hates you I think I am in a position to speak for PHP: "I hate you dude, stop trying to understand me, I'm well above your puny brain".
-
From PHP >> C# or Python?
Anti-Moronic replied to Anti-Moronic's topic in Other Programming Languages
Your choice, but I'd prefer it if I never had to work with Windows again. That makes no sense. wamp is Windows, Apache, Mysql and PHP|Python|Perl Sorry, I have a linux installed via virtual box. Only use it for learning however. To be honest, I would love nothing more than to fully dedicate my time to Python. It looks like a beautiful language and I am already very familiar with linux. Trouble is, speaking from a freelance perspective, I don't see many freelance gigs. They're are tons for php and asp.net. Could you elaborate a tiny bit on your hissing at windows? From a web development point of view? -
From PHP >> C# or Python?
Anti-Moronic replied to Anti-Moronic's topic in Other Programming Languages
Thanks for the advice! I do love working with linux and I have almost no experience working with windows as a server (used windows OS for 15 years). Think I'll dive into C# because you made a very good point, without a Microsoft language I am already restricting myself to linux based jobs. Can anyone advise how I would setup a decent local development environment for ASP.NET and C#? I use wamp for linux and php which works perfectly. Also, is there anything I should be careful of learning. Like C# 4.0? Is that like learning css 3 where it isn't widely used yet? Should I learn C# 3 first, then move up? Appreciate any advice! Thanks. -
Well javascript is the only way to do this without posting information back to the page over and over again, so I'd advise you look into jQuery. Here are a couple of tutorials: http://mondaybynoon.com/2009/02/23/creating-custom-form-elements-using-jquery-selects/ The only way to do this with php is to, after selecting a form element, post the form, then present the conditional form elements based on that. As you can imagine, almost everybody opts for the javascript way.
-
To be honest, using an ID for user level is better but it's not required and I really think it will just serve to confuse you even more. You need to focus on something far more important right now: security. You're not escaping any of the input. Even putting this at the top of your script will work: foreach($_POST as $key => $val){ $_POST[$key] = mysql_real_escape_string($val); } This will escape all post data for you by default. When you get more accustomed to effectively managing user input you can customize to better suit your needs. Maybe look into prepared statements. I wish I'd started using them when I first started. They're as simple as what you're doing now but far more secure.
-
Forgot Admin Password - Help - Can't get back in! NOOB!
Anti-Moronic replied to SgtJohnnyCanuck's topic in PHP Coding Help
Yes, you are missing something. If you don't have access to your database, you need to contact your host. -
..and I'm looking at this from a freelance point of view, not which will get me a higher paying job. I started up a company a while ago, and while things are going well with PHP I'm hoping to expand my horizons. I really really really want to dedicate time to Python but it seems there are far less projects out there as oppose to C#. I don't want to learn Python only to realize I can't ever use it. Any advice?
-
Oh, something else. Before you decide whether to use a framework or not, ask the client if they have a preference. I developed an application a while back only to be told the source code was 'too complex'. It was a large codebase and I used OOP (although not a framework). wtf!? My advice, if a client is non-technical yet picky about the source code, you should be picky about your clients
-
You will find there really are not many downsides to learning or exclusively using a framework. Although you should learn what you can, you shouldn't utilize what you can. The whole idea of using a framework is to provide consistency across your applications. ZF is excellent and I've heard a *lot* of good stuff about CodeIgnitor, as with Symphony. However, I have only focused on a single framework (ZF) so as to become an expert in using and developing it with ease. When you have a 'project skeleton' setup using one of the frameworks you will truly understand the number one benefit: rapid application development. Think it up, you can have a prototype running within a few days (of course dependent on the project, but you get the drift). ON your second post, I would say yes it is a good idea to develop in a 'popular' framework. You see, if you use a popular framework the client has no worry in finding qualified people to further develop. Can be a double edged sword however because now you have given them qualified individuals. Of course, this kind of convenience is a great selling point and you'll likely be the number 1 goto person for further work on it.
-
Forgot Admin Password - Help - Can't get back in! NOOB!
Anti-Moronic replied to SgtJohnnyCanuck's topic in PHP Coding Help
This might help: http://kb.siteground.com/article/How_to_reset_my_SMF_administrative_password.html http://docs.simplemachines.org/index.php?topic=466.0 Basically, editing the file will not help. You need access to your database which you should have no problem (phpmyadmin). -
How do you like to learn new programming skills?
Anti-Moronic replied to micha8l's topic in Miscellaneous
I echo what ignace says: learn through practice. You can learn so much by building a complex application from the ground up, then optimizing the application, then redesigning the application, then extending the application..testing, utilizing etc etc You might also try some quizzes. One on w3c is easy, so make sure you can do that few times over (questions are random somewhat) with 100% correct. Read the rest of the tutorials. While doing this, have a dev environment setup ready to run any php code you throw at it. This will allow you to make use of what you're learning immediately and you'll have lots of fun customizing things. Download some source code for a well designed framework/application w/e and read through that. Try to understand what does what, try to improve on it. Take a class, read a book, search for 'learning techniques', play programming games (they exist). Always try to validate what you're reading. Ensure it is up to date and good/best practice and is objective. If you almost lost the will to live reading ZF documentation, maybe programming isn't for you? Bad documentation and overly technical mumbo jumbo is part and parcel of what we do. practice practice practice. -
Deary me not this again :S Like thorpe said, it's not as black and white as that. Certainly don't take in the opinions of others on this subject apart from that single one. People are blinded, forever trapped in this ridiculous holy war. Do your research on programming in general. In 5 or 10 years maybe you'll *know* when to use one over the other, and what benefits/problems you will encounter for whichever path you take in whatever application you choose. Try to dig up as many Procedural Vs OOP material as you can. Cast away stuff clearly based on opinion and get down to the core of it. Seems to be quite a decent discussion on this page: http://www.linuxjournal.com/content/programmer%E2%80%99s-discussion-procedural-vs-oo ..must say, few of those comments try to keep things objective which is refreshing.
-
I'd have to say my own code also when I first started programming. No indentation, spacing, nothing. I took on a small project near the start and while the code worked I was firmly put in my place. Since then I actively follow best practices and refine my code/techniques/tools as much as possible.
-
Forgot Admin Password - Help - Can't get back in! NOOB!
Anti-Moronic replied to SgtJohnnyCanuck's topic in PHP Coding Help
Oh...lol...try explaining yourself better: "I am new to PHP and I have not worked on the forum for a couple of months" Thought you meant you'd not been here for a couple of months. Would explain why you only have 1 post as you had to reregister. What forum software are you using? You should be able to edit the database directly, just need to know what encryption, if any, the forum uses. -
Forgot Admin Password - Help - Can't get back in! NOOB!
Anti-Moronic replied to SgtJohnnyCanuck's topic in PHP Coding Help
Yeh, maybe they can give you my password while their at it. No, I don't think this will happen. I imagine admin need an absolute way to identify you. Email being ideal. Should probably try contacting support/mod. -
You should instead look into in_array(). Makes this very simple: $allowed_exts = array('jpg','png'); $file_ext = 'jpg'; if(!in_array($file_ext, $allowed_exts)){ $error = "File Type Not Allowed"; } ..ken beat me to it. Well, here's a simple example anyhow.