Updates from January, 2009 Toggle Comment Threads | Keyboard Shortcuts

  • wade 15:03 on Friday, 16 January 2009 Permalink | Log in to leave a Comment  

    Branching and merging best practices 

    After asking some questions about branching and merging best practices, Levi with the Provo Linix Users Group pointed me to High-level Best Practices in Software Configuration Management by Perforce Software. It is indeed high-level, but contained good information.

  • vuel egham 16:11 on Thursday, 6 December 2007 Permalink | Log in to leave a Comment  

    Looking for good intro programming training and theory 

    So I understand the basic of HTML, the concepts of CSS (even if I am still a newb that can’t write it from scratch) and a master of design (;)). But Wade suggested I get some good intro theory training before diving straight into PHP.

    Does anyone know of any good online courses or materials available for such a venture?

    • wade 21:55 on Monday, 10 December 2007 Permalink | Log in to Reply

      The only non-academic one that I am aware of locally is the one offered by New Horizons.

    • MindCenter 10:24 on Friday, 14 December 2007 Permalink | Log in to Reply

      The MindCenter is offering Intro to Programming (2667) on January 9. The information is listed below:
      Date: This class is scheduled to run January 9, 2008*
      Place: The MindCenter
      5505 S 900 E Plaza 1, Ste 225
      Salt Lake City, Utah 84117
      Course Length: 3 Days
      FULL COURSE OUTLINE AVAILABLE AT http://www.mindcenter.net/uploads/2667.pdf
      For more information or to REGISTER: 801-269-1300 or online http://www.mindcenter.net

    • algiepowers 16:07 on Wednesday, 9 January 2008 Permalink | Log in to Reply

      I Googled “PHP training Salt Lake City” and ended up at this post. Per your suggestions, I looked into MindCenter and New Horizons, but there’s nothing scheduled in the immediate future. I even tried to check out a class at SLCC that seemed perfect (“Students learn to create E-Commerce solutions and Internet applications using XHTML, JavaScript, PHP, and MYSQL. Students will also be introduced to CGI and Java Applets.”) but it was cancelled due to lack of students.

      My situation may be similar to vuel’s. I’m proficient in HTML, can stumble around CSS, but feel lost when it comes to PHP. I’m a web designer and everytime I turn around these days I’m running to PHP . I really want to learn this stuff.

      I found an online tutorial site: http://apex.vtc.com/php.php For $30 a month you can go through as many tutorials as you can handle. Compared to these 2K training courses I was reading about, this seems too good to be true. But, they also sell CD versions of all their “classes” so maybe that’s where they make their money.

      So, my question is: What do you think of the idea of online training to learn PHP? Is it a matter of discipline, which makes sitting through a 5-day course more practical in the long run?

      I like this place. You should all go to lunch again. I’d come.

    • tworkman 16:23 on Wednesday, 9 January 2008 Permalink | Log in to Reply

      Not sure of what type of theory Wade suggested or what type of information you are looking for to start programming PHP. The recommendations I would make is to get a cheap book or go to zend.com and go through their tutorials as they are a good resource for new programmers. Another good avenue is to find someone who knows PHP well (most likely a lot of members here do) and see if you can trade some design work for PHP training, this works well as I am a horrible designer but a great coder. If you are looking for more certification type stuff you can checkout brainbench.com or even look at zend.com for their certification classes.

    • thebigdog 16:23 on Wednesday, 9 January 2008 Permalink | Log in to Reply

      i would suggest getting some books first before spending the money on training classes, unless your work can fit the bill. I find that many classes are just going to follow what is popular in the latest books. Save some time and start with a great book first is mho.

    • algiepowers 17:10 on Wednesday, 9 January 2008 Permalink | Log in to Reply

      Great advice, guys! Also, trading design for training sounds like a awesome idea. Anybody interested, just let me know.

      So, I should start with a good book, then go from there, you say? Any specific book you can suggest would be appreciated. Heck, I’ll just go hang out at Barnes and Noble and see what’s out there. But, if you DO have a specific title that you know is decent, that would give me something to start with.

      Here’s where I’m at. It’s not like I want to start programming from scratch, but like twice now I’ve had clients that needed help with some PHP shopping cart they got for free. I had no clue. Plus, a lot of the contract work for interface designers requires some knowledge of PHP.

      So, when is everybody going to lunch again?

    • tworkman 23:14 on Wednesday, 9 January 2008 Permalink | Log in to Reply

      The only books I have on PHP are from WROX publishing and they are PHP4 for gaining a basic understanding of PHP, MYSQL, some apache configuration some basic setup. Of course PHP4 has been replaced by PHP5 and PHP5 is now more object oriented (still not 100% in mho). But the PHP5 book by rocks is the PHP5 for professionals still a good beginners book to get. There are some other cookbook types written by other companies that I have browsed. To save some money I would go to borders and see what they have along with your local library find the ones you want then purchase used ones off of amazon.

    • wade 8:59 on Thursday, 10 January 2008 Permalink | Log in to Reply

      Speaking of books, I would like to remind everyone that UPHPU has a library of books that you can check out for free. We also have relationships with most major publishers and can usually get a copy of any book that interests you in exchange for a short review

  • Bryan Petty 11:09 on Wednesday, 8 August 2007 Permalink | Log in to leave a Comment  

    DefCon 15 Report 

    It’s that time of the year again when hackers of all types get together for their annual celebration of discoveries made throughout the year. We call this DefCon, and every year, new exploits in software and hardware are released to the public.

    I had the opportunity to attend the conference for my sixth year there (for the 15 years it’s been held now) along with more than 8,000 other hackers at the Riviera Hotel & Casino in Las Vegas, Nevada. Presentations were given on about 120 different subjects ranging from drive reanimation to international information warfare. More than $15,000 was raised to support the EFF. Breakout sessions were held for two full days on both wireless WEP and WPA cracking as well as lock picking.

    Contests are also held every year including the infamous Capture the Flag contest designed to find the best team of network and server security gurus that runs continuously from the beginning of the conference to the very end. Hacker Jeopardy provides a test of knowledge of both technical details as well as political and related events. More than 10 other contests are also run including WarDriving, Lock Picking, DefconBots (build an automated robot to accomplish a specific task in the shortest amount of time possible), and a Mystery Box Challenge (you have no clue what you’re up against until the competition starts).

    Highlights from this year’s conference included:

  • wade 20:42 on Sunday, 15 April 2007 Permalink | Log in to leave a Comment  

    Selecting a few unique, random array items by shuffling keys 

    MGeary helped me clean a complex function—containing many lines and loops—up into four concise lines by utilizing the shuffle function. I thought that I would posted it here in case it helps anyone else. I was trying to randomly select five unique items from a multi-dimensional array and although I had achieved the results I wanted, his suggetion allowed me to shorten my code considerably.

    $howmany_want = 5;
    $author_keys = array_keys($authors);
    $author_keys = array_slice($author_keys, 0, $howmany_want);

  • Joshua Simpson 10:15 on Monday, 26 February 2007 Permalink | Log in to leave a Comment  

    OWASP’s WebScarab 

    I’ve been using WebScarab for a while now, and thought I’d share it with those who aren’t familiar with it.  It’s a web security analysis application written in Java.  It has numerous included plug-ins with the standard install, including a spider, parameter fuzzer, session analyzer, HTTP/HTTPS interception/mangling, and much more.  OWASP once again proves their skill in creating a extremely useful tool.  Check it out!

  • David Smith 16:56 on Sunday, 7 May 2006 Permalink | Log in to leave a Comment  

    PHP and the “@” Operator 

    I’ve noticed some confusion of late about the “@” operator and what it does and doesn’t do. To try to clarify this, I’ve written up a quicky article explaining some of the “@” operator’s nuances and provided some example code. Please comment if you find I’ve mistaken something. Enjoy!

  • thebigdog 17:02 on Thursday, 6 April 2006 Permalink | Log in to leave a Comment  

    Great Article on Dovecot 

    Here is a great article on setting up a secure imap/pop3 server with Dovecot. After using Courier for a while I moved to Dovecot after a few conversations with some guys on #utah and dataw0lf. Since then i have never looked back!

    Read the article @ Linux.com

  • John Taber 6:32 on Monday, 20 March 2006 Permalink | Log in to leave a Comment  

    CodeIgniter: the PHP answer? 

    We all like the productivity of Ruby on Rails but most PHP frameworks don’tseem to be quite right—some are too complex, some not stable enough,some not supported by ISP’s, etc. I’ve now tried most of them and myconclusion was to follow the “stupidly simple MVC” series to just writemy own code in a simple way but with some structure.

    But I noticed several posters to that blog series mentionedCodeigniter as a great way to go with sort of the same philosophy.And today it was mentioned on Planet PHP. So I checked it out today, Wow!—it is really, really nice.

    CodeIgniter is quite simple, nothing we couldn’t do ourselves butsomeone else has done all the coding. It follows some Rails MVCmethodology, but in a much more simplified way. And simple is reallygood because it gives flexibility which is the big advantage of PHP.CodeIgniter is very new, just released a few weeks ago.

    For example, the main author is not finished with his active recorddesign so he only has support for MySql (and we usePostgrsql). But the framework is so simple, I can work around that fornow with skipping the active record stuff and just using standard dbcalls. (I can simplify that later when they finish the db architectureand add postgres support). The new Zend framework also takes the simple route too, and might also be a great answer but this approach seems even simpler.

    Check out the codeigniter website�they seem very professional�the documentation is very good (great movie tutorials). Even the quality oftheir forum page is very good (apparently their cms product is verygood). I’m initially really impressed by this. I’m going to try it outtonight.

    • LunarDraco 16:24 on Thursday, 31 July 2008 Permalink | Log in to Reply

      The battle of the frameworks will never end, however i’ve been happy with http://www.CakePHP.org as a full feature MVC framework. It’s support for easily adding vendor code makes it possible and simple to add really nice modules from other frameworks like the Zend Framework (framework.zend.com) as well as easily integrating many php classes from phpClasses. I’ve been using the Cake Framework for about 6 months now. I’ve been watching the project for a verylong time. The community that surrounds the project is very active and the main development team members of the project are very involved in the lists and groups.

  • wade 6:22 on Monday, 28 November 2005 Permalink | Log in to leave a Comment  

    Valid XHTML re-code case study 

    A gentleman popped into our IRC channel this evening asking for some help writing some HTML. He was having a hard time aligning some badges at the bottom of a column. Being all hopped up on birthday cake icing, I accepted the opportunity to write some code for the fun of it and recoded his page. I present to you now a case study in composing valid XHTL and good layout. In the process of exemplifying a possible solution to this man’s problem, I would like to illustrate how simple, lean, and user-friendly proper, valid code can (and definately should) be.

    View original code. | View my code.

    Now, if you attempt to validate the authors code, you will notice that it actually almost validates. So, what is the problem? Why didn’t I simply align his badges at the bottom of his column and move on? I will not take the time to critique his code completely here, but will offer the following general observations instead:

    1. tables should not be used for layout
    2. code should be lowercase
    3. indentation and tag pedigree should be visually logical and consistant
    4. it is 2005, there is no reason that all code shouldn’t be at least XHTML transitional
    5. style declarations should be contained within an external style sheet
    6. good code should not just be legible; it should be beautiful
  • Jacob Wright 15:59 on Monday, 18 July 2005 Permalink | Log in to leave a Comment  

    Creating objects (4 of 5) 

    In the previous three object oriented programming articles written for jacwright.com, we introduced object oriented programming, spoke of thinking about a system object oriented, and discussed the importance of planning, even if only in one’s head. The next two articles, Creating Objects and Reusing Objects, delve into the meatier subject of writing objects. We will be discussing how to implement the plans we’ve made and the systems we’ve conceptualized. Without these principles, object oriented programming can become a mess instead of a blessing.
    Encapsulate, Encapsulate, Dance to the Music (lyrics)

    Encapsulation means keeping your business to yourself. Objects can’t be bothering others with their issues. Other objects have their own stuff to worry about. When we create an object it needs to have methods for other objects to speak with it, but it should rely on others as little as possible. There are two terms we use to describe how encapsulated an object is: “black box? and “white box?.

    Black box describes an object that is completely encapsulated, closed up, secretive. We don’t know anything that’s going on inside of this type of object. We also can’t see anything inside it. We must ask it for anything and everything we want to know about it. For example, a black box object has “getters?? and “setters?? to access it’s properties. A getter or setter is simply a method that returns the object’s properties. So instead of looking at the object’s properties directly, we must request the properties through these methods.

    White box describes an object that is not quite so into security. It doesn’t care if other’s know what it likes for breakfast or it’s favorite color. Often we access it’s properties directly. It may also require us to know more about it in order to use, making it not as easy to use. It may be more needy than a black box object, wanting us to find out about it. We may need to pass it’s properties around to it’s methods and/or call several of its methods to accomplish one task.

    It’s Not Just Black and White

    Although these terms, black box and white box, help give us a way to describe objects, it’s not so black and white. There are varying shades of gray in between. But black box is best, right? Well, again, things aren’t so simple. Writing a black box objects means that we need to take more time to write it’s getters and setters and make sure only necessary methods are publicly accessible. White box objects can be quicker to build and give us more control over the object. They also don’t have to be written to be needy. Black is generally more user friendly (because we don’t need to know more than we have to) and white is generally more flexible (because we have more control outside the object).

    When is a good time to use black box, and when should we use white box then? Good question, glad I asked. If we are creating an object that we will be releasing to the world, or an object that is going to be reused over and over, or an object that we want to be used in just the right way and not any other, we would probably go with a darker shade of box. If the object in question is only going to be used once, if it will only be used by us, or if we want the object to be as flexible as possible.


    Extending an object is having sub-objects based off of the parent. It helps us reuse code, but at the expense of greater portability. We may have a person class with child classes extending it of customer and employee. We may put the similar code in person that customer and employee both share, such as name, address, and a method to store the object. We can then put the unique code in the child classes. Employee will have payroll information and maybe a method to give a bonus. Customer will have a shopping cart and maybe an account.

    Extending is a great way to reuse code, and it makes good sense. We are able to reuse code effectivly between related objects, and if there needs to be a change (for example, we now want to keep track of first name and last name seperatly for all people in our database) then we only need to change it in one place. We also can make the child objects fully black box so that nothing need be known about it. However, if we ever wanted to use our Employee class in another system, we would need to make sure we brought it as well as it’s parent class, Person, over to the new system.

    Beware Family Trees

    There is a caution to be added here. It may sometimes become tempting to create whole family trees, reusing code from the whole system. This is generally a bad idea. Inheritance may work best when it is only a few generations. The reason for this is simple. As stated above, if we wanted to reuse an object in another system, we would have to bring the whole tree over with the object. It also can start to become confusing with so many classes dependant on others. The only time I would suggest extending more than a few generations is when creating a system such as a framework, a component set, a module or something else that would always be packaged together. Even in these situations, there may be a better way to use functionality if it makes sense, and that is object composition.


    Object composition is another way to reuse code. Unlike extending where we inherit methods and properties from parent classes, with composition we make an object with other objects. This could be likened to the human body, one complete object made up of many other objects. The body ties everything together, helping the heart, the braing, the lungs to all work together. The customer’s shopping cart in the previous example could become a seperate object that belongs to the customer. This may make more sense, to keep objects more simple. It increases organization. Of course, like anything else, to much of a good thing can be bad. We wouldn’t want the customer to have a name object which contains his first name and last name. We would start to have more objects than we knew what to do with if we were breaking them down so small.

    Composition is used very often, most any object oriented programs. Larger objects are made up of smaller pieces. It also can be more reusable. The employee object could be used without needing his payroll object and other (non-essential) objects that make him up.

    Object Creation

    Creating objects is a balancing act. Many decisions are made (often subconsiously) about how encapsulated to make an object, how to extend it, and how to compose it. The road to becoming proficient at object oriented programming may often start out with too few of these principles implemented. Then, once they are learned, it may become overused, making systems too complex. Finally, a middle ground will be found when it is remembered that the underlying purpose of object oriented programming is not to reuse but to simplify and organize.

compose new post
next post/next comment
previous post/previous comment
show/hide comments
go to top
go to login
show/hide help
shift + esc