Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by tibberous

  1. id Name Owner 1 Root 0 2 Child 1 3 Child 1 4 Level-2-Child 2 So, I want to get an element, then get all elements that are either direct or indirect children of it. So - getChildren(2) should return 2 and 4, because 4 is a direct child of 2. And getChildren(1) should return 1, 2, 3, 4 because all items are a child of root. I'm pretty sure it needs to be done with a recursive function. Can someone help me out?
  2. Agreed. I'm not even sure why you'd need post count on this board, except maybe to rip of people in the freelance section. Make him start back at 0.
  3. I was wondering what new thing I was going to learn today.
  4. Probably someone at MIT who thought it would be funny to hide a random punch card in another students stack.
  5. $keys = array(); foreach($GLOBALS as $k => $v){ $keys[] = $k; } for($t=1;$keys[$t];$t++){ unset($$keys[$t]); } unset($k); unset($v); unset($t); Yup - un-fucking-set. Hopefully Google spiders this and makes it the top result, because I spent forever looking and couldn't find this - had to figure it our myself =/ And in case your wonder why you'd ever need this - I'm using it for a template system, to wipe out all of the variables defined before the templates index file gets included.
  6. I like to use $_REQUEST to get something from either $_POST or $_GET. Annoying though, it also includes values from cookie, like the PHP session id, FCK editor cookies and the google tracking code. Is there anyway to remove cookie values from request, besides looping through cookie and unsetting the values I don't want?
  7. 1. UEStudio. The free version is at thepiratebay.org 2. Use UEStudio 3. Use UEStudio - it's on by default All joking aside, UEStudio is easy worth the $100 they charge for it. It has sftp and ftp built in, meaning you can edit the files right on the server. It will also open incredibly large text files without crashing (lagging yes, crashing no) The other day, I was able to edit a 1.5 gig sql dump with it -- it even syntax highlighted it!
  8. I just saw a table, where users had 'Active' and 'Inactive' fields. All the queries literally read: update `users` set Active=1, Inactive=0.... Site is horrible all around. All the html is in caps (<TABLE><TR><TD>...) I'm trying not to lowercase it all, but it bugs the shit out of me. Whats the worst you guys have seen?
  9. I want to copy everything in templates/blue to the folder code/ However: shell_exec("cp -r 'templates/blue' 'code'"); Creates a folder called blue inside code. I tried cp -r 'templates/blue/*' 'code', but that didn't do anything. Any ideas?
  10. Alright - I think we basically agree. Maybe I came off bad - I just hate to see someone not get paid, or not get paid what the're worth. So many people start programming because they love it, follow every 'best practice' and 'web standard' because they want to be a great programmer, go above-and-beyond every project, and end up really getting taken advantage of. Programmers focus so much on writing code, but writing code is only half of what gets you paid. I've never given anyone code that didn't work good, or didn't show up correctly in the main browsers - but I'm not going to do everything with xhtml strict div's and jquery either. In my book, that isn't ripping someone off.
  11. Giving someone what they pay for isn't cheating them. If I go to McDonalds, and buy a hamburger, they didn't 'cheat' me. They gave me what they reasonably could for $1, while still making a profit. Did they give me best possible hamburger? No. There is a market for $1 hamburgers same as there is for $50 hamburgers. If someone has $1,000 and wants an ecommerce site, you can either: - Not take the job, and he'll probably get ripped off on elance - Take the job. Make him a perfect site. Ignore the fact you end up making $3.25 an hour - Throw up zen cart and tweak it for a couple hours Do you/have you freelanced?
  12. That's exactly what I was asking. Steel bones would make you heavy and require your body to not only acquire, but sculpt, large amounts of steel. Having a larger brain would take longer to development, and require more calories to support. Also, humans have giant head when they are first born - before C-sections, a lot more babies died in labor. Almost anything that would seem evolutionarily beneficial normally has a drawback (generally the extra food required to support it) But it just seems like there is no downside to having teeth be solid. Maybe without nerves, people chewed hard stuff until their teeth broke? Or filed them down for looks?
  13. Are you able to use something other than an html file? Saving it as a tab delimited file and reading it into a 2 dimensional array is probably your easiest bet - but it really depends on what you are trying to do. Hell, if you have WAMP setup and Navicat, you can just import it into a mysql table and go from there.
  14. But that's the point: you are profit focused, not code focused. Like watching your favorite band going from producing art to starting to suck because they sold out, started focusing on making a buck instead of art. That's the thing - I like programming, but at the end of the day, it's my job. It isn't my art, or my hobby - it's what I do for money. If you guys want to go above-and-beyond, that's great, and hopefully you can find a client that appreciates and is willing to pay for quality. Generally though, people want stuff fast and cheap - a perfectionist attitude is just going to price you out of the market or hurt your hourly rate. Anyone can do something the "best way", but the real trick is delivering the best product you can with the given resources (time, money, people, ect) Even if your salary, projects still have deadlines. If you can't learn to make trade-offs, you risk getting laid off, or having to do work on your own time (provided your company is busy, of course. I've seen some pretty sweet 'webmaster' positions at big companies)
  15. PHP isn't open heart surgery. No one dies if a website doesn't validate. I'm not saying to take $5,000 down on an auction site, but there are tons of little $50-500 dollar jobs floating around that anyone could do with a few days of research. In the beginning, all anyone does is Google, get a book or ask on forums - there isn't anything wrong with getting paid to work. Worst case, you bite off a little too much - you bust ass for a few extra days, end up making $3/hr, and get a lot better at PHP! Did you even read the post I made above that one? I've been programming for 11 years, so your 'amateur' insult falls a little flat. The reason I said security is the biggest problem for on-the-job learning is because it is the one thing that a new programmer won't know to lookout for. If someone says they want a contact form, it's easy to write one and test it to make sure it works. Security problems present themselves later - if the developer and client don't know anything about security, no one will know there is a problem until the site gets hacked. I would love to know what everyone here has accomplished that puts them in a position to insult me - doesn't seem like anyone here is very profit focused.
  16. But what is NOT fine is taking on a project where you don't even know the basic tools required Between Google and forums, anyone should be able to figure out small projects. The big issue though is security - it's one thing to piss with something until it works, it's another to make sure it can't be hacked.
  17. @Crayon Violent I'm not saying to make shitty websites. Our login area has brute-force protection / logging. All of the page includes have direct-access protection. Any form that adds a record uses a key - so you can't create multiple records by refreshing the page. The credit cards are stored in a different database that can't be accessed by the main sql user - so if someone got a hold of our sql backups, or was able to run sql querys, the card numbers would be safe. EVERYTHING is validated. Even OUR admin is protected against SQL injections. I spent a crazy amount of time making it perfect -- but that's because I own part of the company, and am on salary. What I'm saying is not to go nuts worrying about 'best practices', or paradigms, or validation. The only people who know whether the code is good or bad are developers. If you like tables for layout, use tables! If you like functions more than objects, use functions! But more than anything, decide what is appropriate for the project you are working on. If I was in the market for a site, I'd be worried about how it looked, if it worked and how much it cost; and you'll find most clients are the same way. The plumber down the road doesn't need xhtml strict (hell, do it in tables, so when the 70 year old woman down the road pulls it up on her Web TV, it won't look all chopped up )
  18. I'm assuming you're U.S. based, which means you're below average for a software engineer's salary, which would seem to line up well with your ideologies. Learning on the job is one thing, but how much can you really learn with an attitude of hack away until it works so the check clears? - I'm a PHP programmer, not a software engineer. For my area, I'm paid high-average. Maybe somewhere like Maryland you'll get a 100k as a PHP programmer, but it is pretty hard, esp. when your 24. I'm sure that a lot of people here are willing to put in the time and effort to learn what it takes to make it to the top of the developer skill curve, which requires a lot more work and patience than what you're suggesting. Not to mention the disservice you're doing to the industry with the trainwrecks of hack code you're leaving behind for us to clean up as you bounce from client to client or job to job. - I've been with the same company for three years. We run about $600,000 through our sites, handle millions of visitors, and have never been hacked. I've never had to rewrite anything larger than a function. The code is awesome - it doesn't use objects, or validate, or run on the latest-and-greatest framework, but it is secure and easy to work with, and has a nice admin, and shows up perfectly on every browser, in HTML 4.1 transitional Time is a resource. It is stupid to say there is a right or wrong way to allocate it in every situation, especially while talking about being more productive.
  19. LOL - love the pic. I just think the problem come down to programmers, especially new programmers: - 'learning' for way to long, without getting real-world experience. You learn a lot of stuff with big projects, like how to organize code and move data around. Tutorials only do so much. - not realizing the difference between 'theoretically' better and 'actually' better. Your image would be 'theoretically' better if you had an alt tag. 'Theoretically' I could be blind and using a screen reader, or on Lynx. That doesn't mean I'm saying to half-ass everything. Security is VERY important, error handling and input validation are VERY important (maybe not so much for the admin area) - not worrying about money! If you want to program for a job, you have to get shit done and get paid for it. I know so many freelancers that #$%^ themselves every project because they underbid it, then spend forever worrying about crap like validation and adding support for users without ajax. Ajax won't even be a requirement! They'll add it because it is cool. Being able to rationally decide what is and isn't worth the time it takes to do it is one of the hardest things in programming. You won't learn it in college, and some people never learn it. I learned it because I've had 6 projects on my plate, and no money - and realized that if I charged a little more, I could get the same amount of money and only have 4 projects, and if I didn't worry about all of the 'best-practices' crap, I could actually get those 4 projects finished, and my clients would actually be happier, because they got their project done faster.
  20. Not sarcasm. We programmers need to worry more about making money and less about whether or not our code validates, or whether every img on the site has an alt tag, or whether something uses objects or functions. How many roofers do you think spend years working for free and spend hours talking about the theoretically best way to roof? They go out, they get paid and they learn as they do it. It isn't about ripping people off, it's about getting paid for what you are doing. At some point you are going to take a project and get paid, and no matter how long you wait, you won't know everything when you do. You might as well start early.
  21. http://google.com Helpful as always... Are you looking more for a message board type setup or more of a myspace/facebook type setup?
  22. Accessibility and validation are a waste of time. Just learn enough html to be able to make tables and forms - then worry about learning PHP. Go through this and you'll be about as good as %25 of the people on elance: http://www.webmonkey.com/2010/02/php_tutorial_for_beginners/ Biggest thing to learn about PHP is how you can make money with it. If you want to learn PHP, go find someone who wants something programmed and tell them you'll do it for %50 up front. After they paypal you the money, figure out how to do what they want. Now you are: 1) learning PHP 2) getting real-world experience 3) able to afford food, coffee and internet 4) maybe getting a reference - or even a repeat client! I was getting paid to program at 15 years old, with a paypal account I had my mom make. I make $72,000 a year and my shit still doesn't validate. At the end of the day, <br> is worth just as much as <br /> , <br /> just takes longer
  23. I would never trust a site to someone on elance. It is mostly companies that underbid a ton of different jobs, deliver something that either doesn't or barely works, and then go back and forth with you until you go away. Sometimes their bids are not even cheaper than a good programmer in the US would charge, it's just that good programmers tend to stay very busy - and don't have 20 people in India sitting on elance 24/7 trying to get them more work. To be fair, it isn't entirely their fault. Some people think they are going to get the next facebook for $1,700. Most big websites aren't bought, they are developed and MAINTAINED by programmers on salary. That's the other thing that makes it hard to find good US freelancers, most eventually get real jobs. I make $72,000 a year salary - that's hard to do freelancing. Every bad project, slow month, non-paying client, ect. add up. It is nice to work at a company where you can take time off, let someone else handle the bookkeeping, let someone else talk to the customers, let someone else worry about sales, ect. Biggest thing to remember is that a web business is still a business.
  • 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.