Are Python and Objective-C Worth Learning?

python example

Last week’s article on the five programming languages you’ll need next year (and beyond) didn’t include two important languages: Python and Objective-C. Python’s exclusion sparked a passionate response from some readers, to say the least, and led us to craft a follow-up to emphasize Python’s importance to the programming world.

Python is mature (the first version, created by a computer scientist named Guido van Rossum, was released in 1991). Google, where van Rossum worked for several years, has embraced Python as one of its main programming languages. Python enjoys a strong presence among Dice job postings: working knowledge of it will allow you to score a job at far more tech firms than Google. So let’s discuss it a bit, and afterwards, we’ll talk about Objective-C and a few other languages that could land you a good gig.

Click here to find programming jobs.

Python

Python’s syntax is beautiful; the language is concise; and it’s modern. I consider it one of the best languages I’ve ever used, and I feel that one of the biggest mistakes made in the world of computer software was when the browsers added JavaScript as their client-side language. I think that client-side browser development would be more productive, and that better client-side software would exist, if Python had instead become the language of choice.

(Python is also a great language for teaching beginners: although it’s powerful enough for large-scale applications, its simplicity allows anyone with a bit of training to easily create programs.)

Nonetheless, a lot of programmers still don’t use it. Why? I suspect it’s a combination of exposure (they haven’t seen enough of it yet to take the plunge) and their companies’ choice of programming language. I’ve also heard some people dismiss it as a “scripting language,” which is incorrect; although it performs quite well for scripting batch processes and whatnot, it’s also a general-purpose programming language. If the Python community wants to change things, they’ll have to do exactly what they did with the original programming-languages article—make their opinion known, loudly. The noise could convince programmers and companies to take a fresh look at it.

Python is unique compared to the “curly brace” languages that have borrowed syntax from the old C languages (such as C++, Java, C#, and more). It uses indented blocks. The language includes built-in types for dictionaries and lists that are easy to manipulate, and it allows for object-oriented programming, as well as a certain amount of functional programming. Here’s an example of Python code that tests if a number (x) is less than ten, and prints out a message if so; otherwise it prints a different message; note how the lines after the if and after the else are indented:

if (x < 10):

    print(‘x is less than 10′)

else:

    print(‘x is 10 or greater’)

A handy tutorial (with downloads and much more) is available at Python.org.

Objective-C

The old “C” language created in the early 70s didn’t support object-oriented programming. This resulted in computer scientists adding onto the language in different ways. For example, Bjarne Stroustrup created C++ as an extension to C that included object oriented support; the original implementation, called “C with Classes,” was performed through macros in C.

In the early 1980s, another company was implementing a version of C that supported objects and classes; this would become Objective-C. When Steve Jobs left Apple and started Next, the latter used Objective-C. When Jobs returned to Apple by way of Apple’s acquisition of Next, much of the Next technology stack found its way into Apple products, where it continues to live to this day on iOS and other platforms.

In our previous article, we mentioned Swift. Apple suggests that Swift will eventually replace Objective-C. However, because of the huge amount of code “out there” among the millions of iOS apps and Mac software, companies aren’t going to immediately rewrite their code in Swift (if ever). So, while Swift might be the new language, Objective-C is unlikely to go away anytime soon. That means that Objective-C is a great choice if you want to learn iOS and Mac programming.

Objective-C is a superset of C; as such, a simple hello world program in Objective-C could look like this (which is also valid C):

#import <stdio.h>

int main (void)

{

    printf (“Hello world!\n”);

}

If you want to learn more about Objective-C, check out this series of courses offered by Code School. There’s also a very solid rundown available on the Treehouse blog.

C++

In the previous article, one commenter pointed out that the languages under discussion focused primarily on building apps. This is true. My own work involves parallel development, and that extends into embedded programming. Much embedded programming work is done in C or C++, and if you want to contribute to some of the big open-source projects out there (such as Linux itself) much of that work is done in C and C++. These languages might be old, but it’s doubtful that they’re going away anytime soon. (In the meantime, if you want a good overview of C++ basics, take a look at this website.)

Conclusion

It’s hard to list just a few languages that you should learn, especially since so many of those languages have their ups and downs. Programmers need to monitor technology, and carefully weed out the fads that might get big buzz one day, only to be gone the next. Notice that, other than Swift, all the languages listed in these articles are anything but new: once a language establishes itself as vital to programming apps and websites, it’s generally here to stay.

Related Articles

Image: Python.org

Upload Your ResumeEmployers want candidates like you. Upload your resume. Show them you’re awesome.

Comments

  1. BY Joe Smith says:

    Objective-C is a waste to learn. There might be a lot of companies that will still use it, new projects won’t use it. Apple has already said Swift will replace Objective-C. I’ve decided to learn Swift, since it is new.

    • BY will martin says:

      The author’s arguments in favor of legacy products not being ported to Swift, a statement that explicitly references the magnitude of the ecosystem makes your first sentence wrong and wholly emotional in appearance. Emotional choices in software engineering are common; albeit questionable in my judgement.

  2. BY norm says:

    there is so much to learn, that eventually you’ll feel ready to jump off the treadmill. C++, C#, C, latest revision to C++, python, ksh, csh, windows, dos, unix, linux, object C, asm, embeded, Java, Javascript, KSH-93, TCL, Perl, PHP, ASP, Windows, Unix, Linux, etc…etc. I’ve been on the treadmill for 20+ years, people die on the treadmill. Mostly from lack of exercise and too much time in a chair. Try to take the road less traveled, solve the problem for today, and also take the stairs. I’m still on the treadmill, but I also now know to visit the gym, and let the emergencies of today, be handled in a 10 hour day, and no more. Get out and great mr sunshine.

  3. BY Dark Vip3r says:

    Python IS a scripting language >> It might be an advanced scripting language but it still is just a scripting language >> itmay work at for small, medium and sometimes even large projects but it will fail at projects that are complex enough.

    • BY will martin says:

      By scripting you mean it is interpreted? Hmm. Never compiled a python module? Do you know what language the bytecode is?

  4. BY sadsteve says:

    Hm, as an embedded developer that works on small memory devices I’m pretty much limited to c/c++. Python would possibly be useful for the few times I need to generate some table data (like Hamming window table data used for side lobe reduction). Since I’m already familiar with Perl, I’ll just stick with that for the few times I need to generate this type of data.

  5. BY Carter Shore says:

    Python is widely used in Hadoop world, not seeing less of that …

  6. BY Matt says:

    A lot of SDN (Software Defined Networking) is being done using Python. It’s becoming the primary language in this area.

    • BY will martin says:

      The models, the implementation or the runtime? Are you sure you’re not conflating academic and industry research work with front-line product engineering? I’m not saying you’re wrong Matt, but some references would be useful.

  7. BY Bryan McRoberts says:

    I had my doubts about learning Python, but I’ve come to really like it precisely because it has so many similarities to obj-c. It is *not* a scripting language, but its syntax makes prototyping very quick. We use it for very large, very complex apps. Check indeed.com/jobs and you’ll see that python jobs are on the rise, so it’s gaining traction. This was a well written article and I expect that Python will continue to gain in popularity as developers take a look at it seriously without letting preconceived biases cloud their view.

  8. BY CAS says:

    I personally don’t like the syntax of the example that heads this article. I find it ugly.

Post a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>