Learning to program for fun

Discussion in 'Programming & Software Development' started by [deckard], May 6, 2008.

  1. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    This is fucking retarded. Do you even know what the difference between CSS and PHP is?
     
  2. Deftone2k

    Deftone2k In the Darkroom

    Joined:
    Sep 3, 2002
    Messages:
    15,820
    Location:
    Sydney
    Sorry i was assuming it was the style sheets,

    Yes i do know what the difference is, im saying that here you have something you muck around with straight up and down as an option. And then you move on elsewhere, or start from scratch.

    Obviously im no expert at all and have very little idea of incorporating them in a website created in your notepad, nor have i learnt CSS straight up and down but ive had my fun mucking around with it whilst experimenting with OSCommerce (editing, changing etc), adding pages trying out pages from scratch to implement and link to others. The PHP sites i have made locally werent for the public, they were just test realms and they i moved onto making an activation script for outputting a registration key.

    Im still a newbie myself.

    Go ahead and enlighten us all by all means, its not like i was giving him the holy grail of bad advice. Just was putting something forward.
     
    Last edited: Jun 12, 2008
  3. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    It's the way you wrote it, you don't use CSS within PHP. PHP is a server side language, CSS is not so much a language but just a means of presenting your HTML.
     
  4. SupaGu

    SupaGu Member

    Joined:
    Jun 24, 2007
    Messages:
    468
    Location:
    Adelaide, Australia
    I would recommend a language you can get some form of debugging information from, so you can step through your code one line at a time and examine values etc. There are no PHP debuggers that I am aware of.
     
  5. alexc

    alexc Member

    Joined:
    Sep 26, 2002
    Messages:
    1,686
    Location:
    Adelaide
    Thankfully Google is aware of a few :)

    I use Xdebug in a limited capacity.

    You can also process a file with the PHP interpreter via the cmd line. Which is fast and handy and quicker than refreshing the browser to see errors.

    Al
     
  6. Deftone2k

    Deftone2k In the Darkroom

    Joined:
    Sep 3, 2002
    Messages:
    15,820
    Location:
    Sydney
    Uhuh well i didnt mean it in that sense, i was of the thought deckard knew that much about it already,

    Next time ill remember to word it that waaaaaaaaaayz
     
  7. Kabal

    Kabal Member

    Joined:
    Aug 1, 2001
    Messages:
    1,045
    Location:
    Melbourne
    No offense to anyone, because I know a lot of people do it these days probably cause its the fastest way to get something going but...

    Learning PHP first will probably make you a terrible programmer. There. I said it.
     
  8. -=N0N@ME420=-

    -=N0N@ME420=- Member

    Joined:
    May 9, 2004
    Messages:
    7,562
    If I was to start to learn programming, and started with C#.net, would I be able to use this language in the linux world?
     
  9. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    9,535
    Location:
    Briz Vegas
    as opposed to VB... as in Very Bad programmer... hahaha ;)

    Yes lots of PHP code available phpBB and Joomla spring to mind immediately is bad, but the scripting language itself is not to blame...
     
  10. Bradzac

    Bradzac Member

    Joined:
    Aug 17, 2003
    Messages:
    1,744
    You can, if you use mono. However you might be better off learning C++ or Java. That's what most penguin fiddlers use.
     
  11. Bradzac

    Bradzac Member

    Joined:
    Aug 17, 2003
    Messages:
    1,744
    Ding ding ding! Back to your corners ladies, put your dicks and rulers away.

    We get it, Gumby you're a stubborn anti-MS elitist. Ely you're a stubborn pro-MS elitist. And you are both too awesome at what you do to give a shit about each others point of view.

    Both of you go back to working on your billion dollar projects with trillion people userbase and let the thread slide back to topic.
     
  12. Edstructicon

    Edstructicon Member

    Joined:
    Dec 26, 2003
    Messages:
    1,661
    Location:
    Newcastle
    real men do it with machine code.
     
  13. wwwww

    wwwww Member

    Joined:
    Aug 22, 2005
    Messages:
    6,270
    Location:
    Bangkok
    I think C is a great place to start, starting with Java or C# will bastardize your view of the world and will probably make the freedom C offers frustrating. Starting with C gives you a better appreciation for how the world works and will allow you to use other languages more effectively as you expand into them.
     
  14. Bradzac

    Bradzac Member

    Joined:
    Aug 17, 2003
    Messages:
    1,744
    That's the most sensible thing anyone has suggested in this thread yet. That's also the way universities (used to) structure their courses for that exact reason.
     
  15. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    Now they teach VB.Net and i end up fixing some awful code... (i donno what Australian unis teach but in NZ they teach VB.Net)

    And you end up with stuff that is just horrible like:

    Code:
            Public Shared Sub GetQuarters(ByVal ddl As DropDownList)
                ' Set Date dropdown
                Dim d As DataSet = DataAccess.QuickDAL.GetSeasonQuarters
                Dim t As DataTable = d.Tables(0)
                Dim r As DataRow
    
                Dim tt As New DataTable
                Dim tr As DataRow
                tt.Columns.Add("DateRangeDesc")
                tt.Columns.Add("DateRangeValue")
    
                For Each r In t.Rows
                    tr = tt.NewRow
                    tr("DateRangeDesc") = CType(r("QuarterStart"), DateTime).ToString("dd/MM/yyyy") & " - " & _
                        CType(r("QuarterEnd"), DateTime).ToString("dd/MM/yyyy")
    
                    tr("DateRangeValue") = CType(r("QuarterStart"), DateTime).ToString("dd/MM/yyyy") & "|" & _
                        CType(r("QuarterEnd"), DateTime).ToString("dd/MM/yyyy")
    
                    tt.Rows.Add(tr)
                Next
    
                ddl.DataSource = tt
                ddl.DataTextField = "DateRangeDesc"
                ddl.DataValueField = "DateRangeValue"
                ddl.DataBind()
            End Sub
     
  16. Kabal

    Kabal Member

    Joined:
    Aug 1, 2001
    Messages:
    1,045
    Location:
    Melbourne
    It kind of is the fault of php, because thats how so many people used it, and continue to use it, so newbies will as well. Mediocrity begets mediocrity :). Not to say that you can't write good code in PHP, juts saying that if its the first thing you learn, and you learn from all the shit that is out there, you more than likely wont write good php code.
     
  17. wwwww

    wwwww Member

    Joined:
    Aug 22, 2005
    Messages:
    6,270
    Location:
    Bangkok
    I started off with QBasic :p

    At uni though, we started off with Haskell, C and some pseudo-assembly.

    This shift towards Java/VB.Net/etc seems to be geared at pumping out more programmers, and less competent ones.
     
    Last edited: Jun 13, 2008
  18. vanjastar

    vanjastar Member

    Joined:
    Nov 3, 2005
    Messages:
    228
    Location:
    Perth
    I've read numerous articles by people who know their stuff regarding PHP that say otherwise. Generally I hear its the inconsistent library and the way there HAS been a lot of dodgey stuff in the language which has been fixed which lead to bad code examples for people to learn from.

    Not all of them structure it this way anymore. I think its fair to say that a lot of them are moving to teaching Object Orientation and programming concepts before they teach explicit memory management. There's no point learning memory management at the same time as you learn programming.

    Start with a nice object language such as ruby or python to learn basic procedural programming, then move on to understanding object orientated concepts. Then, if later in your life you actually need the power C you can learn the extra section. You say that you're 26 now and have no interest working for a software company, so you may never actually need to learn C, which is fine!
     
  19. Daviesh

    Daviesh Member

    Joined:
    Jun 12, 2002
    Messages:
    91
    Location:
    Darwin
    You would be surprised, Python pops up a fair bit. I have seen a number of instances (one at work) where a big complex C program interacts with python scripts for user driven tasks. The variants NumPy and SciPy pop up a lot in scientific computing, taking over areas that were once FORTRAN's domain.
     
  20. alvarez

    alvarez Member

    Joined:
    Jun 25, 2006
    Messages:
    2,622
    Location:
    Geelong 3218
    yes they do.

    In all honesty it doesn't realy matter which language you pick. VB takes no effort to learn but is essentially useless for anything other than novelty programs.
    What you should be focusing on is trying to understand the computer science behind the expressions otherwise you wont go very far.
     

Share This Page

Advertisement: