Discussion Central

Expand all | Collapse all

Programming Language

  • 1.  Programming Language

    Posted 02-18-2020 17:56
    Hello AIChE!
    I'm a recent Chemical Engineering graduate looking to expand my skills set through programming. Our engineering course only taught Matlab and basic Excel skills. I'm mainly looking at learning VBA or Python, is there one you would recommend more and why?

    Amanda Chun
    Student Researcher
    George Washington University
    San Ramon CA

  • 2.  RE: Programming Language

    Posted 02-19-2020 02:57

    I think you are asking the wrong question.  In the 30 years working as an Engineer, I have used various different programming languages.  The question you should be asking yourself, do I have sufficient knowledge as to how to program efficiently?  Understanding the programming process is the key to any successful program development.  I'm able to program in Fortran, Cobol, VBA, VB.Net,, C#, Python, R, Matlab, SQL.    Am I completely knowledgeable of each of these languages, hell no.

    However I can quickly find my answers for a particular function  in any of these languages online.    I know the basics of each these languages, but more importantly I understand the strengths and weakness of each language.  It takes me about 2 to 3 weeks to understand the program language basics.  It took me years to understand to how to program efficiently.

    So rather looking for a language to learn, do you really know how to program efficiently?

    Best wishes on your new career in the engineering field.

    Marc Champagne
    Data Analytics Engineer
    Decatur IL

  • 3.  RE: Programming Language

    Posted 02-19-2020 06:12
    I think the answer depends on what your goal and passion are.  VBA allows you to embed macros in Excel, giving you the ability to greatly extend the capabilities of what is probably the most widely used engineering calculation tool out there.  Even learning just the basics can help you do some powerful things, and there's a wealth of powerful as you delve deeper.  VB is also used as the scripting language in several other tools.  On the down side, it is a relatively old language that's controlled by one company (Microsoft) and they talk about making it obsolete every one in a while.

    Python, on the other hand, is a powerful, easy to learn, freeware tool that lots of folks out there have developed modules for.  It's has very powerful programming, graphing and data analysis capabilities, and it seems like it is gaining a lot of popularity as a general programming language.  It's a very flexible language, but has the potential drawback that you need to develop the user interface yourself (unlike Excel/VBA).

    With that said, learning the basics of programming is going to be helpful regardless of your current needs.  Once you have a deep understanding of one language, it's relatively easy to understand and modify other tools (so VB can help you understand Fortran, C, Java, Perl, ...).

    Best of luck!


    Charles Sanderson Wayne PA

  • 4.  RE: Programming Language

    Posted 02-19-2020 08:53
    Hello, Amanda,

    Funny you should ask about VBA: I'm working through a four part course on that subject on my own right now. I found such a course from SunCam (Google it: it's a commercial site, as it turns out) that seems to cover the subject adequately with a good number of examples and hands-on exercises. I don't know if you need professional development hours yet, but if so, this course will yield 16 PDHs assuming you go through all four parts.

    Two caveats:
    1. I noted this came from a commercial website, which implies it isn't free. I paid ~$90 for the four parts, with some sort of first-time discount, as I recall.
    2. I can take my time and work through this course as I see fit, since I'm retired--but I'm still keeping my P. E. registration active for another period. You may not have that luxury with respect to time.

    Anyhow, one person's perspective. Hope this is of some assistance.

    PS: if you're considering going for your P. E. license, wonderful! If not, I'd give it some serious thought: it may not be necessary for chemical engineers but it's an additional credential that can only help. Just don't do what I did and wait until you're 45 to go back and get it.

    John Barry PE
    Wenonah NJ

  • 5.  RE: Programming Language

    Posted 02-19-2020 09:20
    ​I highly recommend both, but start with Python. It's easy to learn, powerful (you can do anything with it), and platform-independent. Once you learn Python and the good programming skills that go with it, circle back around to VBA, since Excel and Access are everywhere. Good luck!

    Matthew Minton EIT
    Process Engineer II
    Corpus Christi TX

  • 6.  RE: Programming Language

    Posted 02-19-2020 14:01
    Pick a language that will be useful to you. Keep in mind that to get very good at any language requires you to use it. I program so infrequently that I usually have to look up commands and so on. Keeping my own little code library has helped in this regard.

    I first learned FORTRAN. Python is very generally useful for a variety of tasks. Example: I have used it to read large numbers of data files, analyze data, and spit out new summary files. VBA is useful for automating tasks in MS Office. Example: I had to put 100 images into power point slides and make sure they were all the same size and in the same place on the slide.

  • 7.  RE: Programming Language

    Posted 02-19-2020 16:05
    I think, in general, you are better off learning Python compared to Visual Basic.  As long as you are interested in improving your computer skills and understanding and not trying to become a software engineer per se, Python is simpler to learn and has a vast amount of help and examples available on-line.

    Brian Rohrback
    Infometrix, Inc.
    Bothell WA

  • 8.  RE: Programming Language

    Posted 02-20-2020 19:40
    Depending upon your planned (or unplanned) career path, consider learning PLC and HMI programming, which will broaden your value with knowledge many chemical engineers lack; electrical, automation and controls technology.

  • 9.  RE: Programming Language

    Posted 02-20-2020 00:38
    I thought Marc Champagne answered really well.

    I first learned Fortran with punch cards. ChE-202 at UTexas, Fall, 1974. Which was WAY cooler than the other engineering discipline -202 courses. EE-202? ME-202? PE-202? CE-202? They were still learning slide rule! We were told, "slide rules are dead. Get a TI SR-50 or an HP-35."

    But like Marc said, learning the fundamentals of almost any programming language can help with new languages. The biggest change to me over time has been the change from sequential, compiled program languages like Fortran or Basic, to object-oriented languages like C# or Python. A different mindset. Not willy-nill subroutine calls and Goto statements, but organized recursive constructs with defined data types.

    The first thing to think about is, What do you need to know for the next problem you expect to be faced with? I'd guess Python would be the place to start.

    Steve Cutchen
    Investigator, retired
    US Chemical Safety Board
    Houston TX

  • 10.  RE: Programming Language

    Posted 02-21-2020 09:31
    I think Marc Champagne gave a very good answer.  I would like to add that it helps to pick one and learn all about that language.  You have to start somewhere.  When I first started my career, I knew a little VBA and was able to build on that knowledge to create some very powerful tools.  10 years later I can see the limitations in VBA and pick the language that best fits the task at hand. 

    I recommend starting with VBA.  By the way, Excel and VBA is a powerful combination for engineers.  I would advise to stick with VBA long enough to be fluent, but don't cling to it.

    Benjamin Ishii
    Project Engineer
    Quest Consultants Inc
    Norman OK

  • 11.  RE: Programming Language

    Posted 02-24-2020 17:56
    I think that our colleagues have provided you with some interesting and spot on answers.  One question is what is the industry that you are targeting in your near and long term career pursuits.  Look at what they are using and the trends in those chemical industry segments.  I learned Fortran - right after the cards went away.  The key thing is that knowing how to think as a programmer is the more important thing.  It is after all - a process. Regards, CS Grant

    Christine Grant
    Associate Dean and Professor
    Raleigh NC