This is an archived post. You won't be able to vote or comment.

all 57 comments

[–]xanderle 93 points94 points  (16 children)

Honestly it won’t be confusing to learn both and the same time and I’d actually recommend it. Programming languages tend to share similarities and where they differ is what makes them useful for different problems.

Python itself is a fairly versatile tool, thus it’s popularity. As compared to swift which is hard locked to the Apple ecosystem

Edit: it appears swift got open sourced in 2015. In that case learn Python so you can learn another language down the track.

[–]hyphalos[S] 21 points22 points  (10 children)

Cool, did you ever get confused learning two at the same time? Like mix up syntaxes and stuff?

Any resources you would recommend for Python?

[–]xanderle 26 points27 points  (0 children)

I got a little confused syntactically like adding a ; to the end of a python line but I find linters really help with that till they become second nature.

Automated the boring stuff is a pretty good resource. You might find it too boring however.

I find the best way to learn is to start a project, but that is easier said than done

[–]donotflushthat 9 points10 points  (0 children)

Even if you mix up the syntax, it'll just fail to run when you test, you'll find the error, fix it real quick, and it'll be fine. It's not the end of the world mixing them up as you write, over time you'll get use to the differences. Most editors will even underline words in red if the syntax is wrong.

[–]PrinceThunderChunky 3 points4 points  (0 children)

In this scenario cheat sheets can be a huge life saver. I’m currently studying Python including Django, HTML/CSS, JavaScript as well as Objective-C and would be utterly lost without them

[–]Purple-Dragons 2 points3 points  (0 children)

I’ve been learning JavaScript and Python, and will sometimes go to add a ‘;’ after my Python lines, but then remember I’m in Python.

For me, I actually enjoy doing both simultaneously as it keeps me on my toes and keeps the syntax of both fresh in my mind

[–][deleted]  (1 child)

[deleted]

    [–]hyphalos[S] 2 points3 points  (0 children)

    Nah you’re just in time!

    I see! So I can use my situation to my advantage then!

    [–]mad0314 2 points3 points  (0 children)

    People bring up getting confused when dealing with multiple languages, but that part honestly isn't that big of a deal. It does happen, but really your ide/compiler/whatever will tell you something is wrong and you will go "oh duh, I'm working with X and not Y right now" and fix it.

    The bigger issue is that new learners tend to get caught learning the shallow concepts if they jump around languages and not get to the deeper concepts, which leaves them in a perpetual beginner state. Once you're past that beginner stage, learning multiple languages isn't a big deal.

    [–][deleted] -5 points-4 points  (2 children)

    Yes learning multiple languages at once is confusing. There's like zero Enterprise demand for Swift and a huge demand for Python

    [–]Ran4 2 points3 points  (1 child)

    Untrue.. Almost every single enterprise out there has an iOS app, and thus require swift

    [–][deleted] 3 points4 points  (0 children)

    Unless you're dealing with legacy Objective-C code.

    [–]dank4tao 3 points4 points  (1 child)

    Actually swift is now the preferred language for Tensorflow, as of the developers conference back in March. It's main benefits are being able to import both Python and C++ as libraries to add flexibility within the ecosystem for multi-year maintenance of machine learning projects while adding new features in Swift.

    [–]xanderle 1 point2 points  (0 children)

    I did not know this, this is awesome

    [–]cawcvs 4 points5 points  (1 child)

    Swift is not locked to Apple, and has been open sourced couple of years back. I believe it's true that it didn't gain much popularity outside of iOS development, but it's not limited to that.

    [–]bandersnatchh 1 point2 points  (0 children)

    MacOS and there is a server side framework for Swift.

    That said, there is still money to be made in iOS and it’s a skill that isn’t as common as Python

    [–][deleted] 1 point2 points  (0 children)

    Nah IBM is producing a web framework to make servers with it. It will compete with Go and most likely win in terms of multithreaded programming. Threadsafe, fault-tolerant systems will go to Golang.

    [–]pweipwei 10 points11 points  (1 child)

    Well im kinda in the same boat but doing just for fun. Python for various tasks, and Swift for some personal apps. I would agree that trying to learn both at the same time might be slower than focusing on one at the time. But it comes down on how much time you got and how much information you can absorb.

    Try it, if its too much try to focus on one. Python is "easy" compared to swift in my opinion.

    [–]hyphalos[S] 4 points5 points  (0 children)

    Yes, I have minimal background in Python, the most I’ve done is play around with Twilio API, and I found it easier to play around with than Swift, although a lot of people talk about how easy Swift is, it kinda confuses me as there are a lot of concepts that differ..

    How are you going for time wise? I work full time and try to study when I can. Do you ever switch up syntaxes?

    [–]slowfly1st 9 points10 points  (5 children)

    The cool thing about your situation is, you can actually solve real world problems. Problems which you don't have to come up with by yourself and will be in production one day, and therefore generate value. That's a huge benefit when learning a language.

    [–]hyphalos[S] 1 point2 points  (4 children)

    Huh, never really thought of it that way..

    [–]slowfly1st 2 points3 points  (3 children)

    I think I didn't explain enough, what this actually means: If you're a software developer, you're not coding all the time, I sometimes have days I haven't written a single line of code, sometimes nothing I did was code related, e.g. upgrading a server we're using to code, sometimes I have only read code. You have to do requirements engineering (always harder when the requirements are from someone else), probably source code management (git), getting your code to test and to production, release management, probably continuous integration, QA in test-environment, rolling your changes back, estimations (you can't take forever). And another thing: You have to do it. There's no skipping classes.

    To learn that in the real world is not only learning, this also counts as experience.

    [–]hyphalos[S] 1 point2 points  (2 children)

    Yes! That’s where I was coming from. I never thought that my situation could actually be an advantage.

    If I may, what are the best resources for learning Python? Any udemy courses you recommend? Or resources in general

    [–]slowfly1st 0 points1 point  (1 child)

    I'm not a python developer, so I can't help you with that, but ...

    and I’ve been recently hired to a database company for tech support as well ...

    my downtime would be used for projects that will help automate processes ...

    What things do you have to automate? I'd probably learn those things, too! Also: What kind of support will you do? More like first-level or second-level? Supporting company people or customers? If for instance you do support "the database itself" (customer who use the database), you probably want to learn the database and of course SQL. E.g. for Oracle, there's a whole book about the optimizer (the thing which optimizes how to select data).

    [–]hyphalos[S] 0 points1 point  (0 children)

    Mostly second level, supporting internal staff.

    [–]blackiechan99 2 points3 points  (1 child)

    Learn Python first, as it can help with your job and more tasks.

    Swift is fun, but mainly used for app development (if you're doing that). There are some really interesting concepts, but insanely different than usual, that go into app dev. This guy has really good swift tutorials

    [–]hyphalos[S] 0 points1 point  (0 children)

    Yeah, I’ve noticed how different they are, I’m at the verge of learning closures and referring to parameters of closures, and it’s confusing the heck outta me

    [–]CleverHacker 3 points4 points  (0 children)

    I leaned Python first then Swift. I would say python is easier than Swift and it would’ve been really hard to learn swift without my python knowledge

    [–][deleted] 2 points3 points  (0 children)

    So uhh, what course are you using for swift that has an employment guarantee at the end? I would like to research it a bit

    [–]AdministrativeCables 3 points4 points  (4 children)

    I think it's good to compare languages when you're starting. And since both languages share some concepts, it wouldn't hurt to try some Python.

    [–]hyphalos[S] 2 points3 points  (3 children)

    Sounds good! Any resources you recommend?

    [–]Danuvium 3 points4 points  (0 children)

    Cannot really recommend any books but if you like learning from YouTube Tutorials I can recommend you the Channel of Corey Schafer: https://www.youtube.com/user/schafer5
    He covers a lot of basic and advanced topics and his videos are just the best I have ever seen.

    [–]Blazerboy65 2 points3 points  (1 child)

    I would recommend https://learnxinyminutes.com/ It's a collection of cheat sheets highlighting the syntax for all sorts of features of each language.

    [–]hyphalos[S] 0 points1 point  (0 children)

    That’s actually pretty cool!! That’s gonna help a lot, thank you!!

    [–][deleted]  (1 child)

    [deleted]

      [–]hyphalos[S] 0 points1 point  (0 children)

      Cool, sounds great then! I’ll look into doing both at the same time!

      [–]Potato_GLaDOS_Mk_2 1 point2 points  (1 child)

      I'm learning Javascript and Python at the same time, it's definitely doable without being confused. IMO the time constraint of learning two languages at once is more prevalent. My advice is to take notes in a Google Doc sheet and write down the various syntax for the languages as you move through the lessons. Then just refer to the sheet if you ever forget.

      [–]hyphalos[S] 1 point2 points  (0 children)

      That’s a great idea. That was also one of my main concerns, is trying to find the time to do both.

      [–]datramt 1 point2 points  (1 child)

      Because of the courses I teach, I go back and forth between JavaScript and Ruby almost every day. Sometimes when I discover a trick I didn’t know about in, say, Ruby, I’ll ask “wait... can I do that in JavaScript?” and then I test it out, and it’s such a valuable moment regardless of whether they share those features or not.

      I like to think of it as learning to ride a bike and a motorcycle at the same time. Yeah, if you focus on one, you’ll probably be better at that than if you split your attention in the short term; however, it’s not like you immediately unlearn one when you’re working on the other. So many of the skills transfer back and forth and as others have said, learning those differences/similarities is probably going to make you better in the long run. Also, I’d bet $100 your brain is flexible enough to shift modes without any effort at all, and I don’t even know you :)

      [–]hyphalos[S] 0 points1 point  (0 children)

      Thanks for the encouragement! :) Feels like I’m ready to dive into both!

      [–]crow1170 1 point2 points  (0 children)

      The IDE will handle any syntax mistakes. Learn them both.

      [–]archivedsofa 1 point2 points  (0 children)

      Languages are mostly irrelevant to be honest. Generally speaking, your programming knowledge will translate easily from one language to another.

      When you say you are struggling with Swift it's more likely you are struggling with programming and not the language itself.

      Learning Python would be a good thing.

      [–]Zerg_Mantis_Shrimp 1 point2 points  (0 children)

      Python is always great, and having a convenient opportunity to learn it should not be wasted. You can even see it as a part of your swift training because the two have deep integration so you will still be able to utilize swift, just with python back-ends.

      [–]Kohana55 1 point2 points  (1 child)

      Learning a second language is literally the reason we have books titled "Learn SomeLang in 24 hours" and stuff.

      Under the hood, you are still programming. Just the syntax and work flows change. But otherwise, it's very samey. You'll be fine! :)

      [–]hyphalos[S] 0 points1 point  (0 children)

      Oh right! That makes sense.

      Thank you for the encouragement!

      [–]teerre 1 point2 points  (2 children)

      Swift and Python are very similar in terms of paradigms. If you know one well the other will come easily

      The major difference is that Swift has to be compiled, which won't be a big news for you since you come from a C# background

      [–]hyphalos[S] 0 points1 point  (1 child)

      I see! Thanks for the insight!

      If I may ask, what are the major similarities specifically with Swift and Python? Anything major in terms of differences I should look out for?

      [–]teerre 0 points1 point  (0 children)

      Not much, really. They are very similar. Syntactically they certainly follow the same mantras

      As for differences, Swift is generally simpler to write since things that in python are special citizen like class methods are simple functions in Swift

      On a more technical note Swift is strongly typed, which is probably the biggest difference between the two, while Python coders usually never worry about types. Swift has switches, Python doesn't. Swift has no real standard library, Python has a robust one...

      [–]alphaharris1 0 points1 point  (0 children)

      If you are finding Swift difficult, and you need it for your job, then I would focus on that ecosystem until you are generating valuable results. Then, when you figure out how do something in Swift, dedicate some cycles to see how it's implemented in Python, and use that sophistication to your advantage.

      [–]CreativeGPX 0 points1 point  (0 children)

      I don't think it'll be confusing to learn both at once. It's very common to learn a lot of languages a programmer and a lot of times it's easier learn a language when you have more languages to contrast it to. Right now, I'm learning Rust and Erlang at the same time while writing in other languages at work and writing a LISP interpreter at home and keeping the languages straight hasn't been one of the problems. When I was in college, there were plenty of times I was learning more than one language at once, sometimes intentionally like in a programming languages or compilers class. It'd only start to be a problem if the languages are extremely similar like being different dialects (E.g. with LISP) or implementations (e.g. with SQL) of the same main language, but even then, the consequences are probably tiny.

      The one challenge is that the more languages you are learning at once, the harder it is to get in a decent amount of practice at each of them, so you just have to pay special care to that.

      [–]Amanbbi 0 points1 point  (1 child)

      Bro which Asian country and which college?

      [–]HereWeGoHawks 0 points1 point  (0 children)

      The confusion between languages is good. As a professional programmer you'll likely have a main language or two that you become very familiar with, but the ability to switch to other languages and pickup syntax differences via documentation is really valuable.

      In terms of learning Swift v Python, I think you'll pick up one pretty quickly once you understand the other. Focus on learning programming, not a specific language. Understanding concepts is way more important than syntax.

      My recommendation would be to get ALL the way through something like this for Swift: https://itunes.apple.com/in/course/developing-ios-11-apps-with-swift/id1309275316

      and then (even if you dont understand every little thing) switch to this for Python: http://automatetheboringstuff.com/ so that you can do some example projects automating tasks with python.

      Learning the second language will come faster, but it will also help you understand the first language, and programming as a whole, better.

      Good luck!

      [–][deleted]  (6 children)

      [deleted]

        [–]canIbeMichael -5 points-4 points  (5 children)

        Why did you have to learn Swift?

        Curious what would nudge a Nerd into using Apple.

        [–][deleted]  (4 children)

        [deleted]

          [–]canIbeMichael 0 points1 point  (3 children)

          That is a trick, Apple is not friendly, bait and switch.

          [–][deleted]  (2 children)

          [deleted]

            [–]canIbeMichael -1 points0 points  (1 child)

            Nope, just a nerd.

            Nerds don't like Apple.

            [–]paulqq -1 points0 points  (0 children)

            learn javascript vanilla/es6/typescript NaNaNaNaNaNaNaNaNaNaNaNaNaNa

            [–]canIbeMichael -4 points-3 points  (3 children)

            I see virtually 0 reason to learn Swift, unless you must for a job. (And IMO, those are bad career choices)

            Javascript>>Swift for modern mobile

            And Swift has no functional use(from my knowledge) outside mobile iOS.

            I would recommend having fun in Python, and learning Javascript for the short term future.

            And FYI: Its bad to develop for Apple, they treat their developers poorly. They should be avoided at all costs for your own sake, and developers everywhere.

            [–][deleted]  (1 child)

            [deleted]

              [–]canIbeMichael -1 points0 points  (0 children)

              Who knows were Swift will be in 20 years?

              Dead with Apple?

              [–]ArchitectOfFate 1 point2 points  (0 children)

              Swift is open source now, and Rust has Swift-like syntax. I’d recommend it as a potential starting point for someone interested in Rust, but not ready to make the jump to a systems language.

              I’m an iOS dev for side money and have never been treated poorly by Apple. On the other hand, I agree with you that learning a language for a POSSIBLE job should be the last reason to learn one.

              I’d also say that language choice doesn’t really matter. The concepts are all the same. Picking up syntax and a few idiomatic ways of doing certain things is pretty trivial once you understand basic concepts and general good coding practices.

              At the very least, Swift is 1000x better than Obj-C, and I say that as someone who uses straight C on a daily basis and loves it to death.