SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 40
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Viewing Python in IDE

    Someone is trying to talk me into switching from PHP to Python.

    This may sound funny, but one of the things that concerns me is how the formatting works in Python.

    Everyone seems to think Python is much easier to read, due to things like eliminating curly braces { }.

    This point worries me!

    When I am working in NetBeans on my tiny MacBook monitor, and I have 300 lines of code nested inside an IF-THEN-ELSE, I want my curly brackets to see how things are grouped, damn it!!


    Can anyone here explain how the visual formatting/hints would occur in NetBeans (or a similar IDE) in such a scenario??

    Sincerely,


    Debbie

  2. #2
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,122
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Simple, take your block of code, create a python file, paste it, remove the curly braces

    Remember python uses whitespace to determine which block the code is associated with.

  3. #3
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cpradio View Post
    Simple, take your block of code, create a python file, paste it, remove the curly braces

    Remember python uses whitespace to determine which block the code is associated with.
    First of all, I don't use Python, so telling me to create file is pointless.


    Secondly, I think you missed the entire point of my OP...

    It is a VERY IMPORTANT feature to me that my IDE helps me see where a block of code begins and end.

    If have a IF-THEN-ELSE, where the THEN portion is 3 pages long, then I can't see it all on one MacBook screen, and it helps IMMENSELY to click on the curly brace and have the IDE help me figure out how far down to scroll to find the ELSE portion.

    (It's also nice to have code collapsing/expanding too.)


    See example below...
    Attachment 65019


    I was hoping someone here codes in Python uses NetBeans - or something very similar - and can tell me how the IDE would know where the end of a block of code is like in the screen-shot above.

    Sincerely,


    Debbie

  4. #4
    SitePoint Zealot bronze trophy mawburn's Avatar
    Join Date
    Apr 2014
    Posts
    193
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Well python forces proper indention, it's actually part of the syntax. So blocks of code will look the same in the IDE, just without the brackets.

    Instant-rename_Python.png
    Just a random picture I found of some python code in Netbeans. You can see on the left it has the option to collapse it, so it knows where the code block starts and ends.

    Also, if you have such large pieces of code you should consider moving them into functions, classes, or new files. This helps readability. Personally if I start hitting 10 or so lines in an IF statement, I start thinking of ways to make easier to read. Sometimes it's unavoidable, but most of the time it's not. This goes for any language I use.

  5. #5
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,122
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    That section on the left the folding indicators combined with the blue grouping lines would also exist in your python code. There would be no yellow highlighting of the curly braces, because they don't exist in python.

    My point was, you have the tool at your disposal. You simply could create a myfile.py file, paste your block and see the formatting.

    Screenshots at http://wiki.netbeans.org/Python (granted, they don't indicate folding options at the if statements, but I thought certainly that was available -- so maybe the screenshots are a prior version)

  6. #6
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mawburn View Post
    Well python forces proper indention, it's actually part of the syntax. So blocks of code will look the same in the IDE, just without the brackets.
    How does it do that?

    (That is somewhat scary if Python of my IDE start telling me how to format things?! Um, my code is about as "pretty" as they come!!)


    Quote Originally Posted by mawburn View Post
    Instant-rename_Python.png
    Just a random picture I found of some python code in Netbeans. You can see on the left it has the option to collapse it, so it knows where the code block starts and ends.
    Well that sort of helps, but I wish I had a better idea how it would handle a really long If-Then-Else.


    Quote Originally Posted by mawburn View Post
    Also, if you have such large pieces of code you should consider moving them into functions, classes, or new files. This helps readability. Personally if I start hitting 10 or so lines in an IF statement, I start thinking of ways to make easier to read. Sometimes it's unavoidable, but most of the time it's not. This goes for any language I use.
    Well, *maybe* if I start learning OOP and learn how to break down my code, I can achieve smaller blocks of code, and this thread will become not applicable!

    However, even if I learn and master things like OOP and MVC, any serious system will have blocks of really long and complicated code...

    Sincerely,


    Debbie

  7. #7
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cpradio View Post
    That section on the left the folding indicators combined with the blue grouping lines would also exist in your python code. There would be no yellow highlighting of the curly braces, because they don't exist in python.
    Well, if you have some structure like an IF-THEN-ELSE or a LOOP, how would NetBeans and Python help you figure out where the beginning and end are at?


    Quote Originally Posted by cpradio View Post
    My point was, you have the tool at your disposal. You simply could create a myfile.py file, paste your block and see the formatting.
    Sorry, that went over my head.

    I thought to use Python I'd have to install software and do a whole bunch of complicated stuff...

    Sincerely,


    Debbie

  8. #8
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,122
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    Well, if you have some structure like an IF-THEN-ELSE or a LOOP, how would NetBeans and Python help you figure out where the beginning and end are at?
    Spacing. You have to indent that code 4 spaces from the indentation of the if statement.
    Code:
    def mymethodname
        if blah blah blah:
           if code goes here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
        else:
           else code goes here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
    Quote Originally Posted by DoubleDee View Post
    I thought to use Python I'd have to install software and do a whole bunch of complicated stuff...
    To execute it, yes, but just to see how it is formatted, no. Netbeans should have that built in.

  9. #9
    SitePoint Zealot bronze trophy mawburn's Avatar
    Join Date
    Apr 2014
    Posts
    193
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    How does it do that?

    (That is somewhat scary if Python of my IDE start telling me how to format things?! Um, my code is about as "pretty" as they come!!)
    Yeah, I agree it's weird. But it doesn't seem that bad. I'm actually still learning Python myself so I'm no authority on writing it, I'm just kinda using it here and there to get familiarized. cpradio seems to be much more familiar with it.

    But if you'd like to learn it I do suggest the codeacademy course, it's interactive. http://www.codecademy.com/tracks/python

  10. #10
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,122
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mawburn View Post
    Yeah, I agree it's weird. But it doesn't seem that bad. I'm actually still learning Python myself so I'm no authority on writing it, I'm just kinda using it here and there to get familiarized. cpradio seems to be much more familiar with it.

    But if you'd like to learn it I do suggest the codeacademy course, it's interactive. http://www.codecademy.com/tracks/python
    Yes, Code Academy has an excellent course over Python, but if I recall correctly it is better to take the Ruby one first, as there are things that you go over in the Ruby one that will give you "ah ha" moments in the python one (especially the latter tutorials, that don't guide you very much).

    Ruby did a lot of hand holding, Python threw you in and said "learn to swim!"

    I don't do a lot of python, but I picked it up a few years ago when I needed to write plugins for kexi (an access database replacement for Linux).

  11. #11
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,061
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    Off Topic:


    Quote Originally Posted by DoubleDee View Post
    Someone is trying to talk me into switching from PHP to Python.
    Why are they trying to do that? And why python?
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  12. #12
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cpradio View Post
    Spacing. You have to indent that code 4 spaces from the indentation of the if statement.
    Code:
    def mymethodname
        if blah blah blah:
           if code goes here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
        else:
           else code goes here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here
           and here


    To execute it, yes, but just to see how it is formatted, no. Netbeans should have that built in.
    Nothing personal, but it seems you don't use an IDE?

    I indent and space the hell out of my code now, but that isn't what my original question was about.

    Spacing and indenting don't help you to easily see where the end of Do-While, of If-Then-Else, or whatever is.

    Code highlighting and hinting do.

    I don't care if Python doesn't use curly brackets, but I am hoping it - or NetBeans - would make it easy for me to see what is logically grouped together.

    And as far as trying it out... Sure, I would do that, but since I don't know Python code/syntax, it seems sort of hard to do.

    Sincerely,


    Debbie

  13. #13
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ScallioXTX View Post
    Off Topic:



    Why are they trying to do that? And why python?
    Because PHP is considered amateurish when it comes to writing enterprise code and doing serious OOP.

    And now that my website is nearly done - and looks very nice might I add! - I am thinking of taking the next big leap, and getting into some hard-core programming.

    A lot of people would say to go with C++ or Java, but I think there are some obvious pitfalls there.

    And at least one person I respect pointed out that Python is older than Java, a good choice to get your feet wet in the OOP world, and is much, much easier to learn.

    In my free time I am just checking things out and trying to come to a conclusion later this summer...

    (I have always dreamed of being a Java Goddess, but considering how every time I try and learn Java and OOP I fail, maybe that is a sign I need to back off and try something easier.)

    As far as the whole PHP-war I likely just started would go, HEY, if I didn't like PHP, I wouldn't have spent the lat 4 years writing my website in it.

    And, yeah, I know that it was used to build FaceBook and WikiPedia and lots of other major sites.

    But for those that want a strongly-typed language, and coding rigour, and a true object-oriented language, PHP will never be the choice!!!

    PHP has been VERY good to me, but I think I am ready to step up to the next level, and *maybe* Python would be a good stepping-stone?

    Sincerely,


    Debbie

  14. #14
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,122
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    Nothing personal, but it seems you don't use an IDE?

    I indent and space the hell out of my code now, but that isn't what my original question was about.

    Spacing and indenting don't help you to easily see where the end of Do-While, of If-Then-Else, or whatever is.

    Code highlighting and hinting do.

    I don't care if Python doesn't use curly brackets, but I am hoping it - or NetBeans - would make it easy for me to see what is logically grouped together.

    And as far as trying it out... Sure, I would do that, but since I don't know Python code/syntax, it seems sort of hard to do.

    Sincerely,


    Debbie
    Okay, now I'm starting to get a bit ticked off, as I feel you are not listening to what I'm stating or you just blatantly want a different question answered that was never asked...

    I use several IDEs. From Visual Studio (for .NET work) to phpStorm and many in between. I write in PHP, .NET (C#, VB.NET specifically), Ruby, Python, and Bash frequently. I'm very familiar with IDEs and if you are too, then you'd know that if NetBeans supports Python (and it does) that it would have support for highlighting, syntax, folding of method declarations (and likely if blocks), code hinting, etc. (http://wiki.netbeans.org/Python#Features)

    I feel like I've answered your question and if you really really want to know how netbeans handles python, TRY IT! Find a python script, open it in NetBeans and see how it looks and feels. Sickbeard is a well-known application written in python, feel free to download it and open one of its files within NetBeans.

    I don't know how much better I can explain it to you other than, NetBeans supports Python, supports its indentation syntax (because it has to), and therefore can and would give you a similar experience to what you have with PHP and NetBeans.

    I'm not sure why you are even considering moving to a language you don't understand/know. That is illogical. PHP's declaration of being amateurish is unfounded at best and primarily based on the number of users that use PHP poorly. No offense, but I can find just as many users that use Python poorly, .NET related languages poorly, etc. Does that make them amateurish? No. It simply means there are crappy developers out there who don't bother to learn best practices or bother to think about how they code something.

    Personally, anyone who claims one language is superior over another loses a lot of respect from me as a developer. No one language is perfect for everything. Pick the language for the given job/requirements you have. Don't try to fit the language into the job.

  15. #15
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,061
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    Because PHP is considered amateurish when it comes to writing enterprise code and doing serious OOP.
    Nothing screams enterprise like Java. That doesn't mean Java is the way to go though. Mostly I feel that enterprise is overrated. It's usually so much wrapping and bloat going on you can't see the forest for the trees.
    Regarding PHP and OOP, it used to be quite bad in PHP 4, but in PHP 5, especially since 5.3, it's quite good! There are a lot of reasons not to like PHP, but "not serious OOP" isn't one of them.
    Besides, you've said on more than one occasion that you're allergic to OOP, so this argument should convince you least of all

    Quote Originally Posted by DoubleDee View Post
    And now that my website is nearly done - and looks very nice might I add! - I am thinking of taking the next big leap, and getting into some hard-core programming.
    Aw, you're still in that phase where you think a website can be "done". That's cute

    Quote Originally Posted by DoubleDee View Post
    A lot of people would say to go with C++ or Java, but I think there are some obvious pitfalls there.

    And at least one person I respect pointed out that Python is older than Java, a good choice to get your feet wet in the OOP world, and is much, much easier to learn.
    Yes, but C++ is older than Python, so ...

    Quote Originally Posted by DoubleDee View Post
    But for those that want a strongly-typed language, and coding rigour, and a true object-oriented language, PHP will never be the choice!!!
    That's pretty obvious, since PHP isn't strongly typed. And even python is, it's also dynamically types, which has it's own pitfalls.

    Are you considering other languages as well? I've been playing with Google Go myself, and I have to say I really like it. It's strongly and statically typed, and extremely fast!
    http://golang.org/
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  16. #16
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,061
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by cpradio View Post
    PHP's declaration of being amateurish is unfounded at best and primarily based on the number of users that use PHP poorly. No offense, but I can find just as many users that use Python poorly, .NET related languages poorly, etc. Does that make them amateurish? No. It simply means there are crappy developers out there who don't bother to learn best practices or bother to think about how they code something.

    Personally, anyone who claims one language is superior over another loses a lot of respect from me as a developer. No one language is perfect for everything. Pick the language for the given job/requirements you have. Don't try to fit the language into the job.
    Amen!
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  17. #17
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,122
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ScallioXTX View Post
    Aw, you're still in that phase where you think a website can be "done". That's cute
    Mine has been in the works since 2001 and even today, it isn't finished

  18. #18
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cpradio View Post
    Okay, now I'm starting to get a bit ticked off, as I feel you are not listening to what I'm stating or you just blatantly want a different question answered that was never asked...

    I use several IDEs. From Visual Studio (for .NET work) to phpStorm and many in between. I write in PHP, .NET (C#, VB.NET specifically), Ruby, Python, and Bash frequently. I'm very familiar with IDEs and if you are too, then you'd know that if NetBeans supports Python (and it does) that it would have support for highlighting, syntax, folding of method declarations (and likely if blocks), code hinting, etc. (http://wiki.netbeans.org/Python#Features)

    I feel like I've answered your question and if you really really want to know how netbeans handles python, TRY IT! Find a python script, open it in NetBeans and see how it looks and feels. Sickbeard is a well-known application written in python, feel free to download it and open one of its files within NetBeans.
    I wasn't trying to tick anyone off. I just felt you missed my original question.

    Since I have NetBeans for PHP installed, I can't do your test.

    Maybe later this summer I can install NetBeans for Python and find/write some code and give it a good test.


    Quote Originally Posted by cpradio View Post
    I'm not sure why you are even considering moving to a language you don't understand/know. That is illogical.
    Because C, C++, Java, and Python are more serious, industrial-strength programming languages. PLUS, C++, Java, and Python support *real* object-oriented programming.

    That's why.

    Would you learn sailing in a sailboat or a bathtub? (Unless you're from Arkansas!)


    Quote Originally Posted by cpradio View Post
    PHP's declaration of being amateurish is unfounded at best and primarily based on the number of users that use PHP poorly.
    PHP offer pseduo support for OOP. That is a fact, not opinion. I never said anything about PHP's declarations...


    Quote Originally Posted by cpradio View Post
    No offense, but I can find just as many users that use Python poorly, .NET related languages poorly, etc. Does that make them amateurish? No. It simply means there are crappy developers out there who don't bother to learn best practices or bother to think about how they code something.
    Different topic.

    All languages have crappy developers.

    But C++ and Java are true OO languages. PHP isn't.

    That may not matter to the quality of the end app, but for someone who wants to learn proper OOP, it does matter!


    Quote Originally Posted by cpradio View Post
    Personally, anyone who claims one language is superior over another loses a lot of respect from me as a developer.
    Then you are too attached to certain languages.

    I used to hear the same drivel out of people proclaiming that MS Access was a "true" RDMS, and that VBA was a "true" programming language...


    PHP is one of the best languages for the web, but it isn't strictly typed language, and it's support for true OOP is questionable.


    Quote Originally Posted by cpradio View Post
    No one language is perfect for everything.
    Exactly.

    So why are you implying that PHP is on the same level as C++ and Java when it comes to enterprise development and OOP?


    Quote Originally Posted by cpradio View Post
    Pick the language for the given job/requirements you have.
    I have.


    Quote Originally Posted by cpradio View Post
    Don't try to fit the language into the job.
    I am trying to do that, and it may be Python...


    So, cpradio... How do you REALLY feel??

    Sincerely,


    Debbie

  19. #19
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ScallioXTX View Post
    Nothing screams enterprise like Java. That doesn't mean Java is the way to go though.
    I never said it was either. (Isn't this a Python forum...)


    Quote Originally Posted by ScallioXTX View Post
    Mostly I feel that enterprise is overrated. It's usually so much wrapping and bloat going on you can't see the forest for the trees.
    Which is why so many modern developers like Ruby On Rails, Python, etc.


    Quote Originally Posted by ScallioXTX View Post
    Regarding PHP and OOP, it used to be quite bad in PHP 4, but in PHP 5, especially since 5.3, it's quite good! There are a lot of reasons not to like PHP, but "not serious OOP" isn't one of them.
    If you want to really learn OOP, why do it in PHP?

    I think it is time for me to step out of my conform zone...


    Quote Originally Posted by ScallioXTX View Post
    Besides, you've said on more than one occasion that you're allergic to OOP, so this argument should convince you least of all
    For v2.0

    One of my final wishes before death is to conquer OOP.

    I'm not allergic to it, I just know it is my eternal Achilles Heal.


    Quote Originally Posted by ScallioXTX View Post
    Aw, you're still in that phase where you think a website can be "done". That's cute
    v2.0 is almost done. Nothing "cute" or "dreamt" there.

    Obviously my site will continue to evolve.


    Quote Originally Posted by ScallioXTX View Post
    Yes, but C++ is older than Python, so ...
    So nothing.

    My point was Python is not some new, fad.


    Quote Originally Posted by ScallioXTX View Post
    That's pretty obvious, since PHP isn't strongly typed. And even python is, it's also dynamically types, which has it's own pitfalls.
    From my limited research, and one person I respect, I think Python is a stronger language when it comes to structure and OOP.


    Quote Originally Posted by ScallioXTX View Post
    Are you considering other languages as well? I've been playing with Google Go myself, and I have to say I really like it. It's strongly and statically typed, and extremely fast!
    http://golang.org/
    Yes, I am casually researching how to take my development skills to the next level.

    When I learn OOP, I want to learn it with a language that really takes me to the next level. (I highly doubt PHP can do that.)

    If I could conquer Python or Java or C++ or some other industrial-strength OO language, I think it would do worlds of good for me and my development skills.

    I really like PHP, but I have always found it to be a sloppy language.

    I want to get away from writing everything in one script that is my 500 or 1,000 or even 2,000 lines of code.

    To accomplish this, I think I need 3 things:

    1.) Learn MVC or something like it

    2.) Learn OOA&D

    3.) Program in a serious OO language and try to start writing code that you could get paid to do, that an entire development team could work with, and code that could be used by Google, Twitter, Amazon.com or Wall Street.


    BTW, another reason for my "snobbiness", is that I hope to write my own apps for the Apple Store, and that means needing to know Objective-C, and that means I need a hell of a lot more competency than writing HTML, CSS, and PHP all in one barf script!!!

    Sincerely,


    Debbie

  20. #20
    SitePoint Zealot bronze trophy mawburn's Avatar
    Join Date
    Apr 2014
    Posts
    193
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    If I could conquer Python or Java or C++ or some other industrial-strength OO language, I think it would do worlds of good for me and my development skills.
    C++ is not a good language to learn. It's for low level systems programming and optimization, but even there it's losing ground to other languages that are generally easier to write, like C or Java. Pure CGI programming has been dead for quite a few years. When you see on lists, like wiki, where sites use C++ it's mostly for the backend processes and not the web processes themselves. For instance, at my job the C++ runs some of the legacy CGI stuff built in the 90's that unfortunately is still floating around in a few places and it also does the majority of the data crunching where it's used to process terabytes of data. We're actually moving most of these processes into pure Java so that they are easier to maintain, but it's not high priority.

    You might be referring to C#, which has been the core language used in ASP.Net programming for the last 5 or 6 years. It's actually a really great language and the .Net web stack is very easy to learn, but it's a Microsoft product. C# and Java are also very similar. C# was created as Microsoft's answer to Java and was made to be similar. They have gone different ways over the years, but still syntactically very similar.

    ASP.Net (C#) and Java are the reigning kings of Enterprise Web Development.

    Sadly, the entry bar for Java web development is set pretty high. I don't mean that to be pretentious or elitist, I mean it as a bad thing. It shouldn't be so complicated, but it is and the resources for learning are sparse.

    However if you're really interested in it, the Play Framework makes it a lot easier. But, you should have a pretty good understanding of basic Java programming first. There are tons of resources for Intro to Java programming. Lots of highly rated ones on Udemy.com. If you want a framework that's more enterprisey and used in more places, then Struts2 or Spring MVC is what you should be looking in to. They are way more complicated than they should be and can be difficult to learn for even seasoned Java developers.
    Quote Originally Posted by DoubleDee View Post
    1.) Learn MVC or something like it

    2.) Learn OOA&D
    If you want to learn MVC, there are plenty of MVC Frameworks for PHP. There is also a really great tutorial for how to build your own MVC in PHP. I've personally done the entire tutorial series and it's one of the best tutorials I've ever come across in any language. It would have really helped me learn MVC initially if I had went through this first. (I learned MVC with ASP.Net)

    http://www.youtube.com/watch?v=Aw28-...20112CF84B2229

    11 videos and you should have a good understanding of core MVC concepts after about Video 6, though I do suggest doing all of them. This series will also give you a good feel for OOP in PHP, the framework you create is fully object oriented.

    I am not a fan of PHP, but it does have it's place. Since you're already pretty familiar with PHP, I would suggest this be the route you explore before jumping into a new language. This way you won't need to learn new programming paradigms on top of learning a new syntax and code structure.

    Programming is programming. Syntax is syntax. Knowing how to program is the most important thing, concepts can be transferred between languages and syntaxes. Once you learn to program in a language it's easier to pick up new ones. That's why you see developers nonchalantly naming off 5 or 6 or 10 languages they know.

    Quote Originally Posted by DoubleDee View Post
    I hope to write my own apps for the Apple Store, and that means needing to know Objective-C
    Well, 2 weeks ago that was true. Today and for all foreseeable days in the future, you should learn Swift. It was the major keynote at the Apple World Wide Developers Conference last week. They have pumped a lot of time and money into it being the replacement for Objective-C, which has been out since the 80's. From what I understand is that it integrates seamlessly with Objective-C, so if you're set on learning Objective-C then it's not a waste. Swift is aimed at being easier to learn and use.

    https://developer.apple.com/swift/

  21. #21
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mawburn View Post
    C++ is not a good language to learn. It's for low level systems programming and optimization, but even there it's losing ground to other languages that are generally easier to write, like C or Java.
    That is consistent with what I have heard.


    Quote Originally Posted by mawburn View Post
    Sadly, the bar for Java web development is set pretty high. It's entirely over complicated and the resources for learning are sparse. However if you're really interested in it, the Play Framework makes it a lot easier. But, you should have a pretty good understanding of basic Java programming first. There are tons of resources for Intro to Java programming. Lots of highly rated ones on Udemy.com.
    Yep, again, often what I hear.

    And that is why *maybe* going with something like Python makes sense?


    Quote Originally Posted by mawburn View Post
    If you want to learn MVC, there are plenty of MVC Frameworks for PHP. There is also a really great tutorial for how to build your own MVC in PHP. I've personally done the entire tutorial series and it's one of the best tutorials I've ever come across in any language. It would have really helped me learn MVC initially if I had went through this first. (I learned MVC with ASP.Net)
    I am struggling with this one.

    Yes, I have heard that learning CodeIgnitor or whatever else would be helpful. But then there is that whole, "It's time to let go of PHP and learn something more serious..." voice!


    Quote Originally Posted by mawburn View Post
    http://www.youtube.com/watch?v=Aw28-...20112CF84B2229

    11 videos and you should have a good understanding of core MVC concepts after about Video 6, though I do suggest doing all of them. This series will also give you a good feel for OOP in PHP, the framework you create is fully object oriented.
    Thanks, I will check those out when I can!!



    Quote Originally Posted by mawburn View Post
    I am not a fan of PHP, but it does have it's place.
    Why do you say that?


    Quote Originally Posted by mawburn View Post
    Since you're already pretty familiar with PHP, I would suggest this be the route you explore before jumping into a new language. This way you won't need to learn new programming paradigms on top of learning a new syntax and code structure.
    True.


    Quote Originally Posted by mawburn View Post
    Well, 2 weeks ago that was true. Today and for all foreseeable days in the future, you should learn Swift. It was the major keynote at the Apple World Wide Developers Conference last week. They have pumped a lot of time and money into it being the replacement for Objective-C, which has been out since the 80's. From what I understand is that it integrates seamlessly with Objective-C, so if you're set on learning Objective-C then it's not a waste. Swift is aimed at being easier to learn and use.

    https://developer.apple.com/swift/
    I heard about that, but didn't know it was for iApps. (I thought is was for programming refrigerators and home appliances!)

    So is Swift the real deal, or just a fad?

    Sincerely,


    Debbie

  22. #22
    SitePoint Zealot bronze trophy mawburn's Avatar
    Join Date
    Apr 2014
    Posts
    193
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    And that is why *maybe* going with something like Python makes sense?
    Python is more of a scripting language. Again I'm not really familiar with it, but scripting languages in general are made to make code writing easier and faster at the cost of performance. From what I understand, Python performs really well for a scripting language and is also very easy to write and learn.


    Quote Originally Posted by DoubleDee View Post
    I am struggling with this one.

    Yes, I have heard that learning CodeIgnitor or whatever else would be helpful. But then there is that whole, "It's time to let go of PHP and learn something more serious..." voice!
    CodeIgnitor is no longer being developed as of a couple years ago. But, they can help you learn new concepts without a lot of overhead of learning a new syntax on top of it. There are other frameworks like Laravel or Symfony. I have no experience with them specifically.

    I highly suggest the Build Your Own MVC Framework tutorial I linked previously.

    Quote Originally Posted by DoubleDee View Post
    Why do you say that?
    It's lightweight and it's portable. It has a ton of built in features, which makes development easy and fast. It can run on just about any web server in the world. I wouldn't choose it for a site I'm developing as a single site, but for things like Wordpress or forums or phpMyAdmin, there is really no better option.

    I actually think that Jeff Atwood and the Discourse team messed up a little by using RoR instead of PHP. But, they are smarter and more experienced than me... lol

    http://blog.codinghorror.com/why-ruby/

    Quote Originally Posted by DoubleDee View Post
    I heard about that, but didn't know it was for iApps. (I thought is was for programming refrigerators and home appliances!)

    So is Swift the real deal, or just a fad?
    It's been one of Apple's primary projects for the last few years and it's being billed as a replacement for Objective-C. It was actually built from the ground up with Apps in mind.

  23. #23
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mawburn View Post
    I highly suggest the Build Your Own MVC Framework tutorial I linked previously.
    I will definitely do that!


    Quote Originally Posted by mawburn View Post
    (PHP) It's lightweight and it's portable. It has a ton of built in features, which makes development easy and fast. It can run on just about any web server in the world.

    I wouldn't choose it for a site I'm developing as a single site, but for things like Wordpress or forums or phpMyAdmin, there is really no better option.
    If you were building your own business and website from scratch, and lets say it was a cross between the New York Times and a small Amazon.com, what would you use as a business owner and development team of one?

    (Please answer with a non-Microsoft solution.)



    Quote Originally Posted by mawburn View Post
    It's been one of Apple's primary projects for the last few years and it's being billed as a replacement for Objective-C. It was actually built from the ground up with Apps in mind.
    Is Swift supposed to a true OO language?

    How will it compare to C, C++, Java, C#, etc?

    Sincerely,


    Debbie

  24. #24
    SitePoint Zealot bronze trophy mawburn's Avatar
    Join Date
    Apr 2014
    Posts
    193
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    If you were building your own business and website from scratch, and lets say it was a cross between the New York Times and a small Amazon.com, what would you use as a business owner and development team of one?
    The Play Framework I mentioned earlier. But, I'm already a Java developer and the learning overhead is minimal for me. The language doesn't matter as much as how well the developer knows the language and how comfortable they are in it. Especially today where the backend language is becoming less important and just handing off data to jQuery, Angular.js, Ember.js, etc.


    Quote Originally Posted by DoubleDee View Post
    Is Swift supposed to a true OO language?

    How will it compare to C, C++, Java, C#, etc?
    There are very few languages today that aren't Object Oriented. C is the biggest non-Object Oriented Programming language out there, I can't even think of any other language that isn't off the top of my head.

    I'm not sure how Swift compares to any of those, other than C# and only in the sense that it will run only on an Apple much the same way that C# mostly runs on a Microsoft.

    I will probably never learn Swift. I'm not interested in Apple development at all.
    Off Topic:

    I was really only paying attention to the WWDC because I they were supposed to release the new Mac Mini and I was hoping to buy my first Mac. They didn't so I'm probably going to get a Gigabyte Brix

  25. #25
    SitePoint Member
    Join Date
    May 2014
    Location
    Beaverton, OR, USA
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    If you were building your own business and website from scratch, and lets say it was a cross between the New York Times and a small Amazon.com, what would you use as a business owner and development team of one?

    (Please answer with a non-Microsoft solution.)
    Jumping in here with my own $0.02...

    If I was the developer it'd be Python because that's what I know best. Django is my hammer.

    If I were hiring/outsourcing a developer to build it, it'd be PHP, Ruby, JavaScript (Node.js), or Python depending on these two main factors:

    - What am I most likely to be able to recruit for?


    In some places there's a supply/demand imbalance for particular technology stacks (including the internet). Having an expert available at a reasonable rate is far more useful than someone willing to learn the tech stack you've chosen.

    - Is there an existing framework or toolset that will save me a lot of time and work?

    If there's a killer library or app that does most of what I'd be building, it may be a huge money/time saver to go with what integrates with that best.

    In most cases it doesn't matter much what you choose as long as the people doing the building know their tools well and can get the job done. Sometimes that means you have to use C#.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •