How to become a better programmer (and some other questions)

Discussion in 'Programming' started by danramosd, Dec 3, 2010.

  1. #1
    I have an array of questions even if you could answer just a couple of them it would be great. I got into web design when i was in 6th grade and have been doing it non stop ever since (i'm currently 23). I feel I'm pretty well versed in the computer field for somebody my age. But my downfall is that I don't focus all of my time on one aspect of programming/computers. I do anything from 3d animation, graphic design, video editing, programming, database management, and SEO. I wouldn't say I'm an expert at really any of those fields but most of my knowledge lies in programming. I mainly focus on php and want to know what separates a novice from an expert? I understand OOP very well, a decent amount of security (sanitizing and what not), but feel I lack a little in knowing all of the PHP functions made available to me so i dont have to reinvent the wheel. What can i do to take the next step in becoming a top level programmer. Does anyone ever use TopCoder.com? Is this site or any other ones good at finding a mentor? Is there any way to become a top level programmer other than real experience? Should i look into other languages other than PHP? I know a decent amount of java, some c++, and starting to learn objective-c (iphone development). Would these languages make me a better PHP programmer? Is IRC a helpful resource? I am also VERY interested in security and pen testing(to secure my own websites of course) How do i get involved with that? I know some basics around security, OSes, and know enough in the terminal to be a little dangerous, but want to expand.

    I know this is a lot of questions but like i said before anything would be helpful.
     
    danramosd, Dec 3, 2010 IP
  2. Cozmic

    Cozmic Member

    Messages:
    146
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    48
    #2
    Not really.

    Yes. PHP is such a lenient language (weak typed) that, unless you know a more strict language, it's hard to label yourself as an "expert", only someone that is proficient at getting things done (as opposed to writing good code). Anyway, I'd define an expert programmer as someone who can do more than web development, someone who can also create GUIs proficiently. Web development is much more simple than some of the programming you'd deal with if you got into programming desktop GUIs. Some skills I would assign to an "expert":

    1. The ability to write code for multiple operating systems. Writing drivers is also a plus in this regard.
    2. The ability to create complex GUIs, such as a simple game engine.
    3. The ability to create practical windows applications with form components, tabs, menus, etc.
    4. The ability to access and query an SQL database.
    5. the ability to manipulate images.

    That's not everything of course, but it's a start.

    Yes. Usually when I write PHP I try to pretend that I'm writing Java. PHP is such a lenient language that that's the only way to be standard compliant, if you ask me.

    I recommend real books. You can find online tutorials, but they are mostly chicken crap.
     
    Cozmic, Dec 3, 2010 IP
  3. danramosd

    danramosd Active Member

    Messages:
    115
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    83
    #3
    great response thank you for your input. Im really fascinated with *nix(i have an ubuntu box setup for fun). Would you recommend any specific language to start focusing in on other than PHP. I'm really interested in security and feel a lot of 'hackers' like to use perl or python. Do you think learning one of these languages would help me become a better web programmer or should i stick with something like java, c, or c++?
     
    danramosd, Dec 3, 2010 IP
  4. Cozmic

    Cozmic Member

    Messages:
    146
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    48
    #4
    I recommend Java. It's a heavily object-oriented, strong typed, language which is similar to C++ but much easier. The OOP is very elegant and it has a massive collection or built-in libraries (much bigger than PHP).

    Some links:
    Official tutorial.
    Java for Dummies. I own and recommend it.

    Also there's C, which is nice for lower-level programming, IMO. C (and C++, I'd guess) are compiled for specific operating systems and you may not be able to compile it on a different system to get it to work. If you want to write high-level stuff like applications, Java's the way to go if you ask me.

    I've taken a look at python before. I'm not really a fan. It seems like it doesn't have much built-in functionality compared to java.

    I also looked at PERL, but I hated it. It sort of looks like PHP but worse.

    C# is very similar to Java from what I've seen but a lot of the functionality is limited to Windows.

    So, I'd recommend Java.
     
    Cozmic, Dec 3, 2010 IP
  5. danramosd

    danramosd Active Member

    Messages:
    115
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    83
    #5
    I programmed in java for about 2.5 years and its actually where i learned OOP which carried on over to PHP (i mainly use codeigniter now). All of my programming was done via command line, and learned about data structures (collections, LL, arrays...). Is there any kind of practical use for java or other languages in web programming? I wish i had more time to just play around with these languages, but the time just isn't there and I would like to learn something that would help me increase my knowledge along with being able to use it practically for a website. Are there ways, or reasons to use java or a similar language to create the back end to websites or are the languages pretty much used to created desktop/terminal applications?
     
    danramosd, Dec 3, 2010 IP
  6. Cozmic

    Cozmic Member

    Messages:
    146
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    48
    #6
    I started a thread about PHP alternatives a while ago. I think some of the replies may answer that question: http://forums.digitalpoint.com/showthread.php?t=2010976

    You can code websites with java just about as good as you can with PHP. Using JSP (Java Server Pages) you can embed java code into a webpage similar to PHP with the <% and %> tags. Also you can write classes and put them inside the WEB-INF/classes folder and import them into the JSP page using a special JSP tag. Here's an example JSP page:

    
    <%@page import="java.util.Date" %>
    <html>
       <head>
          <title>JSP</title>
       </head>
       
       <body>
          <h1>Today's date</h1>
          <%= new Date() %>
       </body>
    </html>
    
    Code (markup):
    You need a java server like tomcat to power JSP webpages.
     
    Cozmic, Dec 3, 2010 IP
  7. iLegitimate

    iLegitimate Peon

    Messages:
    319
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    good advice thank you
     
    iLegitimate, Dec 3, 2010 IP
  8. jazzcho

    jazzcho Peon

    Messages:
    326
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I totally disagree with Cozmic.

    An expert programmer is one that can do perfect code fast on his expertise. For example, Fabien Potencier is the Symfony 2 framework creator. I do not know if he can program ARM assemby for embeded systems, but he created what is widely considered the most advanced and fast PHP framework up to day. He is a PHP expert. Not a LUA or a LISP expert. But who cares?

    Linus Torvalds, the creator of Linux kernel, probably does not program in JSP. Is he not an expert programmer?

    Got the point? ;)

    So, to answer your question, decide the area you want to be an expert at, and be one.
     
    jazzcho, Dec 6, 2010 IP
  9. danramosd

    danramosd Active Member

    Messages:
    115
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    83
    #9
    @jazzcho thanks for the reply. I know this might be a little over the top but i want to be an expert at computers. There isn't a part of computers that bores me whether its graphic design, programming, hardware upgrading, security, OSes. I like understanding and learning how what you do in one aspect of computing effects the rest of the system.

    A couple other questions for everyone. Most of the code you write, is it hand written or borrowed and modified? Have you gained most of your knowledge from pure experience or by working with other programmers? And i know security is a huge topic but if i really want to get a solid understanding of it where should i start? Should i dive deep into linux and its terminal or maybe get a better understanding of networks and how information is passed around?
     
    danramosd, Dec 6, 2010 IP
  10. jazzcho

    jazzcho Peon

    Messages:
    326
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #10
    There is simply not enough time on a persons life to be an expert on ALL areas of computers. ;) You can be good at everything but expert only in a few.

    I use ready code a lot but I understand it and modify it to suit my style.
     
    jazzcho, Dec 6, 2010 IP
  11. Cozmic

    Cozmic Member

    Messages:
    146
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    48
    #11
    It depends how you define these. I'd call someone who can make money with their programming a "professional", and that's what I think oyu just described. I'd call an "expert" at "programming" someone with a great deal of general knowledge about programming. You can be an "expert" at "php" but that doesn't make you an "expert" at "programming".

    From dictionary.com:

    See what I mean? An expert is someone who you can consult on things pertaining to what they are an expert in. They may not know the answer, because you can't know everything about something, but have a high level of comprehension of the thing in general.

    He has a very extensive knowledge of programming in general, so I'd call him an expert at programming. I'd also say he's an expert in low-level programming too, because he made the best operating system out there (IMO).

    Unless you believe in reincarnation, this gets a bit tricky. Even if you try to get a degree in Computer Science, most colleges will ask you to select one of several specializations. Same with many other fields like electrical Engineering.

    I will usually:

    1. Try to do something.
    2. Find out how someone else did it. If someone else has done it before in a way I like, I copy and paste their class (with a comment citation) and use the class in my source. I usually keep what I did and what I did not do in their own classes / methods.

    A lot of programming is applying what other people have done. You don't have to reinvent the wheel.

    I'm primarily a hobbyist. I don't have a CS job at this point in time, and I don't see the need to work with others in what I write on my spare time.

    Probably google, unless you want to find a book or sign up for a class somewhere.

    I suggest acquiring at least 1 fully booted linux computer. It's a great OS and anyway it forces you to be good at computers. If you never use any windows specific stuff, chuck windows in the trash I say.
     
    Cozmic, Dec 6, 2010 IP
  12. danramosd

    danramosd Active Member

    Messages:
    115
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    83
    #12
    @cozmic thanks for the reply. I grew up on windows but switched to OS X as soon as i had the money to buy a mac(about 6 yrs ago). I've messed around with linux on and off over the years, have learned a decent amount but eventually i end up doing something really bad which causes the whole system to crash. At that point I normally step away from it for a little bit before I have to reinstall. Do you have a preference on a linux distro? Ive always stuck w/ ubuntu just because I heard it was one of the best out there (obviously that is a very broad statement).
     
    danramosd, Dec 8, 2010 IP
  13. Cozmic

    Cozmic Member

    Messages:
    146
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    48
    #13
    I use ubuntu. It's the most user-friendly and the software center is VERY handy. They say windows has a lot of software but that's simply windows conformist fanboyism. :p There's a ton of free stuff for ubuntu. Installing a server, for example, is just as simple as:

    sudo tasksel install lamp-server
    Code (markup):
     
    Cozmic, Dec 8, 2010 IP
  14. Chukwuma ItISWell

    Chukwuma ItISWell Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #14
    How can I write a poker program in C that would display graphics? I do not have a lot of knowledge about C and I am just new into the world of C programming. I need help in this aspect
    Thanks for your replies in advance.
     
    Chukwuma ItISWell, Feb 26, 2013 IP
  15. RAND0M1ZER

    RAND0M1ZER Active Member

    Messages:
    142
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #15
    1) Try taking courses in programming languages (you learn a lot of theory which is helpful in becoming a real expert)
    2) Program large applications, not just small things. This is where real experience is gained.
    3) Learn different languages and understand how programs are compiled, run, developed.
    4) Practice, Practice, Practice.
     
    RAND0M1ZER, Feb 26, 2013 IP