Jump to content

KevinM1

Moderators
  • Posts

    5,222
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by KevinM1

  1. GoDaddy is horrible. Avoid them like the plague. I tend to use ICDSoft. Decent price (~$7/month) with great features and no down time. And, just realize that becoming competent in web programming, especially if you have no prior programming experience, will take time. Don't expect to be up and running in a month.
  2. They were pretty expert. I think it just means they liked breaking things into really atomic components. Think Rim, Spokes, Hub, Bearing, Value Stem, Tube, Tire versus Bicycle Wheel... Which is only useful if you need to be able to swap those incredibly granular parts at runtime. If you don't need to touch them in an individual manner, you're just wasting time.
  3. No they wouldn't. In a method maybe, but not a class. Well, I have heard them say that. If that's true, they're idiots. There's no set "X lines or above means you're doing it wrong" guideline. It all depends on what you're trying to do. A better gauge is to keep track of repeated code. Good code is clear, concise, and doesn't repeat itself. If you find yourself repeating chunks of code, that's a clear sign that you need to refactor what you have.
  4. Just be sure to use your new powers wisely, and never for hookers and blow.... >_>
  5. You need to think hard about your db design and normalize your tables. Here's a primer: http://mikehillyer.com/articles/an-introduction-to-database-normalization/
  6. I've heard of this before, and think you have a good idea! Dumb question, but how do I get the Unix Timestamp in PHP? And how do I convert it to a format that is more agreeable with a Salt? (e.g. 123456) Lastly, is there a way to "guarantee" that a Salt or Hash is unique by possibly appending an incremental value on the end, or would I not want to do that? Thanks, Debbie You wouldn't generate the timestamp in PHP, but rather in SQL during the user registration insert (escaping and validation left out for brevity): $query = "INSERT INTO users ('username', 'password', 'date_joined') VALUES ('{$_POST['username']}', SHA2(CONCAT({$_POST['password']}, UNIX_TIMESTAMP()), 512), UNIX_TIMESTAMP())"; The password is built by concatenating the timestamp to the entered password: CONCAT({$_POST['password']}, UNIX_TIMESTAMP()) In PHP, that would be: $_POST['password'] . /*timestamp*/ That is then passed into MySQL's version of SHA-512. UNIX_TIMESTAMP(), when used without arguments, returns the number of seconds since the epoch. No tweaking required. Even better, when returned from a SELECT query, it plays nicely with PHP's date/time functions.
  7. I like using a unix timestamp as salt. It's easy to generate, is useful in and of itself (it's not uncommon to want to know when a user registered for a site), and doesn't advertise itself as a salt column. It's also generally unique for every user (unless you have two users who registered at precisely the same time, which is an incredibly rare phenomenon). It's a nice solution for those small-to-moderate sized sites.
  8. I think this site could improved. For starters, there's just a lot of stuff on the screen. The index page has four different background patterns/textures: 1. Header/footer stripes 2. White border texture 3. The blue Fleur de Lis looking pattern 4. The splat pattern in the content area It's too busy, and makes the text hard to read. The 'Silva Developments' button looks a bit smooshed horizontally, and the lettering looks a bit cockeyed. Stretch it out, and make it easier to read. The other big thing is to work on your writing. There are some awkward parts, as well as an uneven tone. Are you trying to be straight-laced and professional? Relaxed and informal? Do turns of phrase like "One of the coolest things about my CMS is..." fit with what you're trying to broadcast as your image? Above all else, remember that you're selling yourself. To that end, don't mention skills you don't possess, and don't give weak equivocations like "I'm working on learning X." Don't lie to clients, but don't give them a reason to doubt you. Regardless of what vibe you want to give off, always convey confidence about your skills. If you don't at least appear to be completely confident in yourself, why should a client have confidence in you? One final, small quibble - don't list HTML and HTML 5 separately, or CSS and CSS 3. They're simply revisions to existing standards, and are about 90% the same as previous iterations. It would be like listing PHP 4 and PHP 5 separately (even though there are more appreciable differences between them). One of the things a lot of new developers do is try to dazzle potential clients with jargon in order to make up for their own lack of skill or confidence. Don't be that guy. Clients and potential clients desire two things above all else: 1. Honesty 2. Clarity In the long run, it's better to lose business because you can't meet a client's needs than to promise what you can't deliver and string them along while trying to learn on the job. And, it's even better to be the honest guy who comes into the picture to fix Mr. Jargon's mess. That's the path to repeat business and referrals. All that said, you have a decent base here. Work on editing/refining/improving it.
  9. Globals and OOP are fundamentally opposite ideas. Globals are generally bad regardless, as they lead to spaghetti code. EDIT: See http://www.phpfreaks.com/forums/index.php?topic=351194.msg1659987#msg1659987
  10. In the States, a full time entry level developer makes somewhere around $30k a year, at minimum (right out of school).
  11. How hard is it to figure out? You've seen how to create a salt and salted and hashed password. You store those in the users table along with the rest of their info upon registration. For login (pseudocode): if entered username exists in the db: retrieve salt and password for that username if salt + entered password == retrieved password: log user in else: bad password else: bad username
  12. IIRC, hashing an already hashed value actually increases the chances of collision. Could be wrong, but Ii think I read that somewhere.
  13. Slight quibble - a Singleton is defined by the fact that it has a static method return (or create THEN return) an instance of its own class. Merely having a protected/private constructor in a class with static methods does NOT make it a Singleton (nor imply that intent). Static utility classes that don't need to retain state/utilize an instance is a common design pattern, to the extent that at least one language (C#) allows one to define an entire class as static, which forces the class itself to ONLY contain static methods. Regardless, static classes and Singletons should be used with care as they ignore scope and encapsulation. There's usually a better way to solve a problem than to use one of them.
  14. Well, what does your day normally consist of? What difficulty areas in your own skillset have you identified? What kind of projects do you work on?
  15. This topic has been moved to Application Frameworks. http://www.phpfreaks.com/forums/index.php?topic=352519.0
  16. i'm a fan of lists. I just think that, for an easy website like this, content will be easier managed with tables. Bad idea. Tables should only be used for tabular data. If you're going to learn design, learn it correctly the first time.
  17. It's all a steaming pile.
  18. Matt, like I said before, we are not here to teach people how to program in PHP from the ground up. We're not here to explain every single line of code we present as a solution. We are not tutors. The message forum format just doesn't work well for that, and, frankly, we don't have the time for it. We do what we can in this format, but no one gets dedicated one-on-one instruction here. Also note that Psycho's code is almost identical to what I gave you. The differences between the two are minute, with the exception of the ternary operator - ? : - which is just a shorthand version of if/else. Also note that a place like Stack Overflow discourages discussion. It's format just doesn't allow for "Yeah, but...." Also note that, again, the reason why people repeat things to you ad nauseam is because there are only so many ways to explain and re-explain something. Especially when it's something basic. --- Maybe you're just not cut out for this? There's nothing wrong with that. I'll never be an artist because I don't think in those terms. Maybe programming just isn't for you.
  19. No dice, issue remains. Someone on the WordPress Stack Exchange site mentioned that maybe the blog loop itself is messed up, but then promptly removed that answer. It's moot anyway since I signed a NDA, so I can't show the code.
  20. I'm in a bit of a bind. I have to create some pagination for the blog, but I believe I'm running into the bug described here (http://wordpress.org/support/topic/archives-not-showing-nextprev-windows-only-crazy?replies=5), and I don't have authorization to fiddle with the server's php.ini file. So, I need to find a way to create pagination for the blog without having max_num_pages. Is that possible? I don't want to re-engineer the blog loop if I don't have to.
  21. Agreed. The search box also falls off the page in Firefox.
  22. Not really. Global variables everywhere and the encouragement to mix logic with presentation are signs of badly developed software. WordPress is popular because it's friendly to end users. It's a POS under the hood.
  23. I just hate the whole theme/loop system. I could do more with a regular MVC setup. And do it faster, too.
  24. Both of my current clients are using it. It's just such an ass backwards system.
  25. That is all.
×
×
  • 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.