Hide Document Parts:
   Digital Media
QR Code
Output Options:
Print Document
Download PDF
Page 1
    of 1.
    3 results. Newest
    • Oldest
    • 10
    • 20
    • 30
    • 40
    • 50
    posts showing.

    Knowing when it’s time to toss code out!

    Published . Last updated .

    Rounding up slightly I have spent 10 hours this week redesigning the notification and form submission system… Actually, I seriously just thought of something else I missed.

    So now that I’ve spent 10 hours on the completed notification and form submission system I’ve come to the point where I want to toss out all the old code that is taking up space in my project. I’m happy to see it go because it really cleans up the project but I don’t want to actually delete it forever so this post will serve as it’s final resting place. Well this code is being saved primarily for nostalgia’s sake I feel some programmers, especially those that are just starting out, would like to pick these apart and see the not so beautiful development process in action. For starters let me share with you a picture showing the layout of events these scripts were trying to accomplish. Early on as I developed these scripts it hit me that things were getting way out of hand so I stopped and mocked everything up to come up with a new plan of attack.

    Trusting user input in PHP’s chmod: decimal vs. octal

    Published . Last updated .

    The PHP manual on chmod has a subtle little warning about providing a decimal number instead of an octal when calling the chmod function:

    Mode is not automatically assumed to be an octal value, so to ensure the expected operation, you need to prefix mode with a zero (0).

    So what does this warning really mean and more importantly what is a programmer to do when allowing users to input the mode themselves? Besides shouting out never allow the user to do this! and calling it case closed, I would like to show you what you can do to solve this problem and a legitimate reason why you might use this solution in your application.

    Is that a URL, URI, or URN?

    Published . Last updated .

    Today I learned that I have been using the term URI (Uniform Resource Identifier) incorrectly. Apparently so many people misuse the acronyms URL, URI, and URN that there is entire blog posts out there trying to clear up the confusion.

    So why is this random piece of knowledge so important I felt like doing a blog post on it? Well put simply I believe that it’s important to try and learn all you can about your trade even those random snippets of knowledge that honestly most people will never need to know. Unless you deal with web based software or technologies that deal directly with internet protocols you probably will never care what people call that magic string of characters that takes you across the internet.

    Keeping that explanation in mind you should stop reading this post and have a glance at Daniel Miessler’s The Difference Between URLs and URIs. In case of link rot I have copied the image from his post below since it does a good job at summarizing what he talks about.