What programming language should I learn?

Discussion in 'Miscellaneous' started by 607, Dec 23, 2014.

?

Of which of these things do you know a fair bit?

HTML 16 vote(s) 39.0%
GML 4 vote(s) 9.8%
anything from the BASIC family 8 vote(s) 19.5%
Java 17 vote(s) 41.5%
Javascript 14 vote(s) 34.1%
C or C++ 20 vote(s) 48.8%
C# 5 vote(s) 12.2%
Python 14 vote(s) 34.1%
Unity 5 vote(s) 12.2%
Flash 5 vote(s) 12.2%
Multiple votes are allowed.
  1. No, it's a bad language. Swift is a modern language and still requires semicolons. As does Java and many other modern languages.
    jkjkjk182 likes this.
  2. I don't know if I'm just some sort of outlier or something but I don't understand 'bad habits' in programming? What makes one habit good and another bad? To me that's like saying apples are correct & good and oranges are wrong & bad.
    ShelLuser and 607 like this.
  3. Basically, mba is an old fashioned programmer who likes his semi-colons. VB.NET doesn't use any semi-colons. You may or may not know (I don't know if you can program and what not), but a semi-colon is to end that statement of the code, even though VB.NET has its own method of compensating for this by letting programmers use "_" to continue onto the next line. What mba is saying is that as VB.NET doesn't use semi-colons when learning another language you will not instictivly put semi-colons. My first programming language that I learnt was VB.NET. I had dabbled around in a multitude of other languages but could never get the motivation to learn them (the reason I learnt VB.NET was that we used it in Computer Science). However, since then I have began learning PHP and have just got back into Java, and I still forget to use semi-colons most of the time even though I have a good knowledge of PHP. It's becoming easier but it takes time to learn no matter and I believe that just because you learn VB.NET doesn't mean it will make you worse at learning to use semi-colons. Anyways - the reason mba hates VB.NET is becaues it doesn't use semi-colons even though there is no need for them anymore as there are other ways to get around it.
    ShelLuser and 607 like this.
  4. There's some standards that almost every programming language uses (such as using semicolons at the end of a line) and when one programming language doesn't, it just isn't consistent.
    jkjkjk182 likes this.
  5. end of statement*
    ShelLuser and 607 like this.
  6. vb.net is not a 'bad language' ... it has it's own library and reference system... microsoft built up their library from scratch and use their own references...

    apparently none of you have read comparison reviews ... the syntax between c# and vb.net is a bit different... but the functionality and support is almost the same.... the reason they are mainly only used on windows devices, is because the coding uses references on the device itself, instead of using external sources or having to write everything from scratch.

    Which speed wise and functionality wise is a better approach... and 'no' vb.net is not going out, they just had another update, and they are actually expanding...

    mono is a port system for linux and macs to use vb.net and c# on those devices - and they are actually expanding as well
    ShelLuser and 607 like this.
  7. I think it's more about what you do in the language than the language itself. Bad habits would be doing things like copy&pasting code rather than refactoring often-repeated code into functions or possibly a library, a tenet known as Don't Repeat Yourself (DRY). A good list of more examples of bad programming habits/patterns can be found on Wikipedia.
    Pab10S, 607 and ShelLuser like this.
  8. Careful there.

    I didn't read through the whole thread but ended with this and hit reply because this hit a nerve ;) From a systems administrators perspective PHP is also a bad language, maybe even worse.

    I did upgrades within the 5.x series; where commands were dropped because of reasons I still fail to understand. Which is still a blasphemy to me. A minor upgrade, in my opinion for sure, should never imply such tremendous changes. Yet PHP did. Basically rendering websites from the "old era" useless because a whole lot of stuff stopped working.

    And don't you give me the "they could have seen it coming". Because within that same reasoning the powers that be (PHP programmers) could also have gone the extra mileage and changed the offending commands to remain backwards compatible and keep thing working. That's what a programming language tends to do, should do. Not PHP.

    And also don't give me the "its an easy work around". I know, I implemented it myself too a few times:

    Code:
    function session_register() {                                                          $args = func_get_args();                                                        foreach ($args as $key) {                                                              $_SESSION[$key]=$GLOBALS[$key];                                        }
    }
    function session_is_registered($key) {
            return isset($_SESSION[$key]);
    }
    function session_unregister($key) {
            unset($_SESSION[$key]);
    }
    foreach ($_GET as $key => $value) {
      $$key = $value;
    }
    foreach ($_COOKIE as $key => $value) {
      $$key = $value;
    }
    
    To me its only insult to injury and why I consider PHP a bad language too; if it is this easy, why not implement it into the language itself? Why the drastic changes within a minor version?

    Needless to say; as a sysadmin I hate PHP and even dare to consider it inferior. This is the Internet age, we all (should) know the need for updates and bug fixes. So to implement a bugfix which requires the skills of a programmer, requires an program upgrade, all within a minor upgrade even.... that doesn't work well with me.

    VB.NET never pulled these kind of stunts.

    Calling a language stupid bad merely because of its syntax... careful there. I can come up with worse examples.
  9. No. Not by a long shot. There's so much more different than just semicolons. They share (roughly) the same features, but the syntax is very different.
    SoulPunisher and 607 like this.
  10. Hey! :)

    Do you know what Scratch is? It's something where you don't really write any code, and everything's based on fairly restrictive drag & drop. It's meant as an introduction to coding in general, which I don't need. http://scratch.mit.edu/ At least, that's what I thought. When looking at it again, it looks like you can do more with it than I thought, but it's not really usable for anything serious, I think.

    True. They are, especially GFA-BASIC is.
    Yeah, true. I don't really have experience with object orientated languages indeed. But that doesn't mean I can't try to learn it, obviously. But maybe it would be better to learn an other 'linear language' first.

    My father has worked with Oracle for years and years :rolleyes:
    At the moment, I'm trying to get into webapps. Before I only created executables, and before that people could only execute my programs from within GFA-BASIC. But I'm trying to get into webapps. I don't really want anything with smartphones or things, I'm staying on pc for now.

    I know that HTML isn't a programming language, I've used HTML quite a bit :rolleyes:

    I'm looking for pc only at the moment, no smartphones or consoles.

    I've also used w3schools for HTML, it's a nice place to learn.
    Thank you for that.
    Interesting.

    Thank you for the responses!

    I'm feeling fairly interested for Python, at the moment.
    ShelLuser likes this.
  11. So, I did actually choose Python and played around in it a fair bit.
    Now here's where my ignorance comes into play.
    I have found a tutorial which covers Python's commands, and have no problems using them. The only problem is that I only know how to use the thingy that directly executes the commands. I think you know what I mean. When I write something, and press enter, it instantly executes it.
    Is there a way to write, save and load pre-written programs?
    Perry_Stahlsis likes this.
  12. Absolutely, and its quite easy too.

    Just open up your favorite editor, make a file with the .py extension (makes it easy to recognize) and then just put your code in there.

    When you've finished all you need to do is save the file, then start python again, but this time with the newly created file as an argument. Now it'll execute the code from the file.
    Perry_Stahlsis likes this.
  13. VisualBasic.Net is an extension of VisualBasic which itself was an extension of BASIC. A language that predates my birth, by a fair amount and I'm 43 years old. BASIC was born in 1964. It has a great deal of cruft inherited from that legacy. This means it has ancient stuff that is considered bad form in modern languages and often modern programmers are unaware of its existence!

    Statement terminators such as a semi-colon make it easier to write a compiler, or interpreter. That's why they're used. they also predate modern languages by a lot. End of story.



    Bad Cruft -- the AND operator in an if-statement in BASIC:
    In what are often accepted as features of truly modern languages the if statement performs what is known as short-circuit execution for all logic operators. In other words once we know definitively that an if-statement it is TRUE or FALSE, the rest of the expression is no longer evaluated. (False AND True --> is always False... there is no need to look at the right side... it doing so wastes time) For BASIC, and all its descendants claiming backward compatibility, both sides of an AND are fully evaluated even if we know the result. This is because this is how many of the original BASIC implementations were crafted.

    What's the harm? You say. Well Minimally performance will suffer. As is often the case some programmers will wrongly embed side-effect producing calls on the second half of the AND. (e.g. If (myFlag AND object.DoSideEffectWithBooleanResult()) Then ...)

    But VB.Net is Modern, can't it support a short-circuit AND? Yes, MS introduced the Keyword AndAlso ... It does precisely this.

    However, the number of times I've had to correct problems caused by the used of AND instead of AndAlso is mindbogglilng. This is true of code written by people I coached previously on when to choose which keyword. (hint: usually you want AndAlso ...) Such ambiguities make VB.Net more of a pain than its worth for enterprise level of code. So learn it, learn its pitfalls, and then choose a language with less ambiguous cruft for any sizable project.
    mba2012 and M4nic_M1ner like this.
  14. 1. Does the code accurately represent the task at hand. If not look out for said "bad habits." Misleading code will be edited based on what it appears to do, rather than what it actually does. This will probably break it. So if it's misleading due to performance or other necessary enhancements DOCUMENT, DOCUMENT, DOCUMENT... inside of code comments and in design documentation.

    2. Do others readily understand the code? Rarely does programming occur in isolation, never to be revisited even by you. (6 months down the road will you really remember that the variable "spoon", now passed 15 calls deep, was meant to store an important result from an operation whose logic you just changed? No really. You won't remember that. That's why inaccurate naming is a bad habit)

    3. Is the code easy (relatively) to modify, not just for you, without "breaking everything?" If not you've succumbed to the bad habit of Fragile Code. Sometimes code is fragile by the very nature of the task at hand. But if all of your code is fragile, you really need to revisit your coding habits.

    EDIT: I noticed something in my descriptions that I would like to point out. If someone tells you THAT something is a bad habit, but can't tell you WHY it's considered that, dig into it on your own. Don't take them at their word. But also don't assume they're wrong. They still might be right, just ignorant on why. Knowing why something is risky or bad empowers you.
    mba2012 likes this.
  15. And once you want much more advanced features than a simple text editor has, use google to search for: Python Integrated Development Environment.

    Be warned IDE's can be overwhelming. So for now, keep what you're doing simple so that you stay focused on the important parts of learning.
    mba2012, ShelLuser and 607 like this.
  16. Indeed, and MS is to be commended for keeping backward compatibility. It helped them tremendously.

    However I did post a reply about how VB.NET at its core is still BASIC which is a 50 year old language. :)
    So it inherits the cruft of that legacy. The main thing being ambiguity between what we're taught modern languages behave like and how it has to behave to keep backward compatibility. This creates confusion in many VB.Net programmers, and ultimately results in hard to find, and eliminate bugs all traceable to the split between implementation and expectation.

    With that said, I still think it's worthwhile to learn. This is doubly true if you expect to work with .Net. Seldom in my career have I found a "single language" implementation of any sizable system. While I prefer C# and work in it most of the time, I still have to code in VB.Net from time to time. (Legacy code, but many legacies live forever...)
    sambish20 likes this.
  17. Was there a need for 4 posts?
    607 likes this.
  18. Of course; he responded to different people regarding different topics / subjects.

    In fact; would he have combined all of that into one post then I think it would have become very hard to read and follow. So yah, IMO this was absolutely the right thing to do.
    mba2012, Pab10S and Perry_Stahlsis like this.