So, I started a personal blog ...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • edgeprod
    Permanently Gone
    • Mar 2004
    • 10019

    #1

    So, I started a personal blog ...

    Yes, this is a cross-post. Whee-ha.

    I'm not sure what I'm intending to do with it, how long I'll keep it, or who my audience even is, but if you're a coder (or someone who deals with coders), you might find it interesting.

    Comments are welcomed, as I'm trying to at least provide SOME level of service to people out there.

    In the short term, I'll probably write about how to treat clients, how to document code, explore PHP tricks and tips, and other topics.

    I posted a sample of my code because I hate when people just start talking about something without you being able to see their own work.

    I also posted about ending a contract on good terms and avoiding spaghetti code.

    If you find any of this the least bit useful, please leave comments our encouragement here ... if there's a desire to read more, I'll probably keep it going.

    Thanks for looking. If I have you on ignore and you reply, I apologize in advance, but I'm sure you know why.
  • PR_Sebas
    Confirmed User
    • Dec 2006
    • 2825

    #2
    looks good... best of luck with it

    Comment

    • fris
      I have to go potty
      • Aug 2002
      • 55789

      #3
      whats a blog?
      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


      My Newest Theme

      Comment

      • HorseShit
        Too lazy to set a custom title
        • Dec 2004
        • 17513

        #4
        I will hopefully never go to that blog

        Comment

        • Sands
          Confirmed User
          • Feb 2007
          • 3134

          #5
          Increase the font size on the code, dude. It's hard to read.

          Comment

          • edgeprod
            Permanently Gone
            • Mar 2004
            • 10019

            #6
            Originally posted by NwSebas
            looks good... best of luck with it
            Thanks! I've been doing what I do for a while, so I figure if I can pass some tips along and it helps someone, all the better.


            Originally posted by jdavis
            I will hopefully never go to that blog
            Agreed.

            Comment

            • edgeprod
              Permanently Gone
              • Mar 2004
              • 10019

              #7
              Originally posted by Sands
              Increase the font size on the code, dude. It's hard to read.
              Sorry, missed your comment before. I made it 14 px now. Is that a bit easier? It is easier for ME to read (it WAS small, you're right), and it doesn't blow out the table (bonus!). Let me know.

              Thanks!

              Comment

              • edgeprod
                Permanently Gone
                • Mar 2004
                • 10019

                #8
                This week's update is about IDEs and why I use them versus Notepad. The "popular" thing to say is "yeah, I write code on Notepad," and then (I assume) to throw down "old school" gang signs. I discuss this on Wednesday in a short commentary piece.

                Opening paragraph (the rest is scheduled for Wednesday, and will appear automatically on the blog, not on GFY):

                Unless you live under a rock, you know that integrated development environments are for sissies, and Notepad is the "old school," "hardcore," or "l33t" platform for developing code. I call bullshit. A good IDE can reduce time to market, improve coding efficiency, and help you write tighter code.

                Comment

                • born2blog
                  Confirmed User
                  • Sep 2006
                  • 1801

                  #9
                  Originally posted by fris
                  whats a blog?
                  I don't know, seems it's all the rave these days
                  Juicy Ads - Buy & Sell Quality Traffic!!

                  Comment

                  • collegeboobies
                    So Fucking Banned
                    • Jul 2004
                    • 3644

                    #10
                    Originally posted by edgeprod
                    This week's update is about IDEs and why I use them versus Notepad. The "popular" thing to say is "yeah, I write code on Notepad," and then (I assume) to throw down "old school" gang signs. I discuss this on Wednesday in a short commentary piece.

                    Opening paragraph (the rest is scheduled for Wednesday, and will appear automatically on the blog, not on GFY):

                    Ok, write about your blog on your blog, not here

                    Comment

                    • Si
                      Such Fun!
                      • Feb 2008
                      • 13900

                      #11
                      Originally posted by born2blog
                      I don't know, seems it's all the rave these days
                      SHIT!

                      Didn't know

                      Better go and download PressWord versions 7 and start making blost pogs.

                      thanks for teh tip

                      Comment

                      • edgeprod
                        Permanently Gone
                        • Mar 2004
                        • 10019

                        #12
                        Originally posted by mobilefun1987
                        SHIT!

                        Didn't know

                        Better go and download PressWord versions 7 and start making blost pogs.

                        thanks for teh tip


                        That cracked me up.

                        Comment

                        • 2012
                          So Fucking What
                          • Jul 2006
                          • 17189

                          #13
                          your "put up or shut up" code example is a Hello World Class ? :D
                          best host: Webair | best sponsor: Kink | best coder: 688218966 | Go Fuck Yourself

                          Comment

                          • edgeprod
                            Permanently Gone
                            • Mar 2004
                            • 10019

                            #14
                            Originally posted by fartfly
                            your "put up or shut up" code example is a Hello World Class ? :D
                            What would you prefer? I figured it'd be an uncomplicated way to show the way I code, indent, document, etc.

                            Do you have a better suggestion to illustrate those concepts? I'd be happy to hear it out and decide if I'd like to post it.

                            Comment

                            • quantum-x
                              Confirmed User
                              • Feb 2002
                              • 6863

                              #15
                              Originally posted by edgeprod
                              Yes, this is a cross-post. Whee-ha.

                              I'm not sure what I'm intending to do with it, how long I'll keep it, or who my audience even is, but if you're a coder (or someone who deals with coders), you might find it interesting.

                              Comments are welcomed, as I'm trying to at least provide SOME level of service to people out there.

                              In the short term, I'll probably write about how to treat clients, how to document code, explore PHP tricks and tips, and other topics.

                              I posted a sample of my code because I hate when people just start talking about something without you being able to see their own work.

                              I also posted about ending a contract on good terms and avoiding spaghetti code.

                              If you find any of this the least bit useful, please leave comments our encouragement here ... if there's a desire to read more, I'll probably keep it going.

                              Thanks for looking. If I have you on ignore and you reply, I apologize in advance, but I'm sure you know why.
                              Looks good. If you're going to the effort of coding in classes in PHP, you should use exceptions too (..if you already don't)
                              PrettyInCash.com - BoozedGFs.com - TeenGFs.com - JizzGFs.com- MilfUploads.com -

                              Comment

                              • 2012
                                So Fucking What
                                • Jul 2006
                                • 17189

                                #16
                                Originally posted by edgeprod
                                I figured it'd be an uncomplicated way to show the way I code, indent, document, etc.
                                yeah, it did. i just thought the two concepts were funny
                                best host: Webair | best sponsor: Kink | best coder: 688218966 | Go Fuck Yourself

                                Comment

                                • edgeprod
                                  Permanently Gone
                                  • Mar 2004
                                  • 10019

                                  #17
                                  Originally posted by quantum-x
                                  Looks good. If you're going to the effort of coding in classes in PHP, you should use exceptions too (..if you already don't)
                                  Thanks very much. For error handling in the Hello class, I used the default handler in switch(), rather than throwing an actual exception. I wanted the code to be backward-compatible with PHP4.

                                  Comment

                                  • Brujah
                                    Beer Money Baron
                                    • Jan 2001
                                    • 22157

                                    #18
                                    Originally posted by edgeprod
                                    In the short term, I'll probably write about how to treat clients...

                                    Comment

                                    • edgeprod
                                      Permanently Gone
                                      • Mar 2004
                                      • 10019

                                      #19
                                      Originally posted by fartfly
                                      yeah, it did. i just thought the two concepts were funny
                                      Your comment definitely made me laugh ... I just added the clarification for other people who might be tempted to "not get it" if you know what I mean.

                                      Comment

                                      • quantum-x
                                        Confirmed User
                                        • Feb 2002
                                        • 6863

                                        #20
                                        Originally posted by edgeprod
                                        Thanks very much. For error handling in the Hello class, I used the default handler in switch(), rather than throwing an actual exception. I wanted the code to be backward-compatible with PHP4.
                                        Well, considering PHP4 is well and truly gone now...(but I do understand your frustration)
                                        Coders discussing style always turns into a pissing contest, but here we go.

                                        There are a few things that could be built on / improved. Not sure if you left them out because it was a simplistic example, or because you don't use them.

                                        I spent pretty much every moment of the day coding, and could have done w/ some sage tips, especially w/ OOP in PHP when I was learning, so take this for what it is.

                                        - Making the $returnText shouldn't be public. It should be private, with an accessor function.
                                        - You shouldn't refer to it as $returnText .= " " - it should be $this->returnText This will save you a hell of a lot of frustration with scope, and missing and overwritten variables down the line
                                        - Returning a string for error checking isn't really that strong, because you then have to further check that string for errors.

                                        You can do this two ways, easily
                                        #1 - Via exceptions - simply throw an exception when you receive bad data, and catch it on the other side, or in the parent class, depending on your heirachy.

                                        #2 - PHP4 Compatible: Have it return a boolean for the results, and let the user fetch them (ie, if (!$helloWorld->GetHelloText('1')) { // error code } else { $helloWorld->GetResult(); }

                                        and so on.
                                        These things become increasingly important as your classes get more complicated - it's important to do it from the ground up.

                                        Using __construct() is very important, too.

                                        The problem, at least in my interpretation, w/ OOP in PHP is that it's not as strict as say Java or c++, meaning that it can be done poorly, which leads to headaches later on.

                                        In any case though, kudos for posting this - there aren't many coders (esp on this board) that are much more than scripters, even less than those that understand design pricinciples and flow (specification, implementation, verification, documentation, etc), normalised db designs, and the big one: security. The number of scripts that I see getting passed around on here that are insecure is scary.

                                        Anyhow.. didn't mean to sound like a grumpy old bastard, the merit of your post inspired me to reply.
                                        PrettyInCash.com - BoozedGFs.com - TeenGFs.com - JizzGFs.com- MilfUploads.com -

                                        Comment

                                        • edgeprod
                                          Permanently Gone
                                          • Mar 2004
                                          • 10019

                                          #21
                                          Originally posted by quantum-x
                                          There are a few things that could be built on / improved. Not sure if you left them out because it was a simplistic example, or because you don't use them.
                                          What you posted is almost exactly how I'd "scale" the class as it becomes more complicated and/or becomes production code. I can't believe we haven't worked together before on something! Be sure to light up my ICQ.

                                          Comment

                                          Working...