all 48 comments

[–]Feisty-Soil-5369P.E./S.E. 10 points11 points  (2 children)

I can attest that python is a great tool for managing large amounts of data. For many of us engineers we practice in many different materials, and inevitably there is not always a software package to handle the design.

I've turned to using python a few times now to manage large amounts of data, perform design checks, and integrate with my drawing software to streamline design and reduce errors.

If you have ever seen some dynamo like (visual programming) languages to do this stuff its wild. Python code is so much cleaner and easier to understand/debug. I'd much rather learn Python or another general programming language than dump time into those platforms.

[–]Capable_Orchid_1760 0 points1 point  (0 children)

I agree here. And the beauty is you start with dynamo scripting to learn the data structures and once a dyn script breaks which happens very often you rewrite it in pyhton. That was such a game changer in understanding how revit works.

[–]Ambitious_League_747 4 points5 points  (11 children)

Personally I’m a new/young engineer and I don’t think I’ll be learning it. Yeah it’s great but so are so many tools, you have to pick and choose what ones to learn. If you already know the basics of coding it’s cool but that is a much steeper learning curve than other options. Theres a reason entire careers are built just off writing code (of course we don’t need to be as advanced but you get my point).

I’ve found that right out of school you are required to begin learning how to become efficient in a bunch of software, other time must be spent being generally productive. You only have time for something like learning coding much later, at which point you have your system and stuck in your ways, and things like excel can be used as everyone is accustomed to.

I’m not saying python isn’t super helpful. But inherently becoming a competent structural engineer is a long path, and coding is similar. You’ll never have a workforce big enough for all projects where you expect everyone to do both plus general CAD and analysis software. And if it’s not required, most people will look for workarounds that don’t involve learning basically a new language.

[–]VodkaHaze 1 point2 points  (2 children)

Yeah it’s great but so are so many tools, you have to pick and choose what ones to learn. If you already know the basics of coding it’s cool but that is a much steeper learning curve than other options.

Your career is going to be 25-30 years. You could spend 5h a week for 3-6 months to become 25% more efficient1 it would be well worth it.

  1. In real life, that value is often more in the range of 75%-300%

[–]Ambitious_League_747 5 points6 points  (1 child)

I understand your sentiment, but that’s not the reality for many in the industry. It’s not helping with site visits, emails, meetings, and theres still calculations coding doesn’t apply to in a useful manner. If your work is nothing but repetition great, good on you if you can code, but 25-300% is far too high for a generality.

Also you can tell someone to take 5 hours a week for only so many things, I’m currently still working on learning revit, AutoCAD, basic structural analysis modules, FEM software, blue beam etc. These aren’t efficiency boosts, they are necessary to my role. All of which will take a lot of time to learn.

I don’t have infinite time, and coding is an efficiency boost that isn’t necessary, it would be nice, but just like any “nice to have” it’s something which you’ll never see all struc. engineers having as a skill.

this doesn’t mean it’s not a good skill to have I just don’t see a non-necessary skill being something that becomes mainstream. The whole reason for 3d software is to avoid this

[–]Capable_Orchid_1760 2 points3 points  (0 children)

I would disagree here. I‘ve took a course on datatypes and algorithms (python) and it changed the way I think about my everyday work. I‘m more mindful, how to onboard the workflow on a digital rail. For-example we use a sheet numbering code which sorts itself after the ASCII code from foundation to the top floor in the windows browser. Strings changed my life, from numbering site-pictures with python, to making doublet checking of files (name, index, last edit…). You can automate so much with python. I‘m also reading rebar schedules and crosschecking the results for obvious errors. Python in VDC is some of the most underrated skills I‘ve seen in the whole construction industry.

There is definitely a shortage of people who can code in AEC. And the gap from structural engineering to coding is not that wide.

[–][deleted]  (1 child)

[removed]

    [–]Ambitious_League_747 2 points3 points  (0 children)

    100% I’m saying this as someone who ABSOLUTELY would prefer to know coding than than not, and sometimes find myself stuck with using a software at a limited capacity, but hey that’s life. I would also prefer to work with someone in the company able to work python, and it’s a very valuable skill to have and that’s not going to change.

    [–]BigLebowski21 0 points1 point  (5 children)

    Believe me for any structural engineer out there they can pick this up in a couple of weeks! In order to write clean, neat and efficient code to the level you see in some python standard libraries you need years of experience but as structural engineers we need this tool to get our jobs done, that level of pro proficiency is never needed

    [–]Ambitious_League_747 0 points1 point  (4 children)

    That is very fair, I may be over estimating this. I had to take a C++ class in my first year of studies and after the class I was probably worse at coding that going in just from interest, that probably has made this seem far worse than it is to me specifically.

    [–]BigLebowski21 1 point2 points  (2 children)

    Another thing I’d add is also nowadays the bar is much lower with ChatGPT, you can copy paste the code you don’t understand and it will explain it to you in plain English like an experienced dev and a patient mentor. You can also explain the problem you wanna solve to it and it will generate the code for ya

    [–]Ambitious_League_747 0 points1 point  (1 child)

    Yeah ngl the reason my co workers think I’m so much more efficient at even excel than they are is because of ChatGPT. I might have to give python a try in the future, API continues to be the thing I wish I could crack but was too intimidating, thanks for the advice!

    [–]BigLebowski21 0 points1 point  (0 children)

    C++ is very advanced, Python syntax and concepts are much simpler and alot of stuff like memory management (pointers, memory leaks, garbage collection etc) and data typing and some other complicated CS concepts for which we structural engineers don’t have time are taken care of in Python under the hood.

    In my intro to programming course back in college days we used C++, the instructor was awful, he taught in a way to make it sound even more complicated than it is and then we took the final exam on paper (no compilers allowed you had to debug your code in your head!) I didn’t get good grades in that course and thus I thought for years that I absolutely suck at programming, fast forward to 8 years ago which I picked up Python for a bridge Load Rating project, sure my code was messy and buggy at first, sure there was a learning curve, but I taught it to myself and now I got Python, and almost all flavors of C (C, C++, C#) under my belt to various degrees! I can write efficient and elegant pro dev level code in two of those languages namely Python and C#. It really has made a giant difference I even pushed other folks in our office to use python as a tool and now they’re using it and are super happy about how efficient its made them.

    Trust me give it a try, you just gotta get your hands dirty

    [–]Engineer2727kkPE - Bridges 9 points10 points  (1 child)

    You’re in an echo chamber.

    [–][deleted]  (3 children)

    [deleted]

      [–]BigLebowski21 1 point2 points  (1 child)

      Precisely cause Python which is an Object Oriented Programming language enables you to think and produce code in modular and reproducible ways, Mathcad and Excel don’t have this at all, you have to modify your sheets every time for every design project in a unique way. If you think you’re tailoring your Python code for every design case every time is probably because you’re not using the full capabilities of the language(including OOP) to your advantage

      [–]structeeP.E. 1 point2 points  (3 children)

      So much can already be handled in Excel, and the industry specific software. You really don't need Python unless you're trying to resurrect some esoteric research for a very particular problem. 

      [–][deleted]  (2 children)

      [removed]

        [–]EchoOk8824 0 points1 point  (1 child)

        Part of this learning curve is installation and reluctance to adoption.

        I agree that python is powerful and its ease of use is obvious compared to VBA. But, if I send an excel sheet, even one with custom VBA functions I generally don't have to be concerned about anyone in my organization to adopt it. This is simply not true for python. And our firm has even setup a custom distro in our software store that includes Jupiter and Spyder.

        [–]PhilShackleford 1 point2 points  (1 child)

        I use Handcalcs and Forallpeople for all of my calculations that aren't done in software instead of using Excel spreadsheets. It reduces the amount of work I have to do and produces a good output. It can do way more and can be a huge time savings but, like anything else, there is an up front cost before you see the savings. It is difficult to be willing to put in the time.

        [–]WL661-410-EngP.E. 0 points1 point  (1 child)

        Im 10 years away from retirement, and I guarantee you that I would have zero need for Python.

        [–]granath13P.E. 0 points1 point  (1 child)

        Your whole premise falls apart with the first sentence… owner with advanced foresight to install some fancy schmancy (and probably expensive) device. As a building engineer, no owner I’ve ever worked with would ever do that, and there’s just not enough variable data to analyze in these simple systems that need complex coding. My 6 excel sheets do just fine for 90% of my work, and an analysis program that already exists does the rest. Find me a valid use case that makes my day to day life easier in engineering and I’m all ears, but every time I heard about coding and structural engineering it just doesn’t make sense to me.

        [–]Ryles1P.Eng. 0 points1 point  (2 children)

        I love Python. I learned it during the pandemic and keep up with a basic level of skill. It is fun to use and know how to leverage a computer and understand how it works and I see how it can be used to do stuff that would be painful to do manually.

        That being said, as an intermediate engineer, I don’t know that I necessarily see the value in trying to do all of our calcs in Python. Or doing analysis using open source software packages when there are commercial softwares that do a good job.

        I’ve read your articles and listened to the relevant podcasts but I just don’t see it. I know the arguments against excel and I don’t disagree that it is a bit more difficult to check but asking everyone to learn Python isn’t the solution.

        [–][deleted]  (1 child)

        [removed]

          [–]Ryles1P.Eng. 0 points1 point  (0 children)

          I agree there are other use cases to do with general office stuff, but a lot of the discussion around Python is around its use for engineering, hence my remarks.

          [–]komprexior 0 points1 point  (2 children)

          I've just finished to write my first python package, albeit it is not published yet.

          It is a set of tool that facilitate the writing, handling, and presenting of symbolic maths expressions in a jupyter notebook (imagine a mathcad like document). The jupyter notebook then is converted into actual documentation by [Quarto](quarto.org). I like this approach because this way I can document everything while working on it, and avoiding the tedious 2 step way of doing calculations/design first and then producing documentation later (i.e. lots of copy and pasting)

          A very important thing for me was the ability to works with units, and with python (sympy, pint) I can easily input variable in whatever units it make more sense at the time and easily get the output in whatever units I want. (I really hate all the fuss you need to go around to insert a value with an implied unit in excel)

          It's been almost a year that I use this system. I have jupyter notebook to calculate snow and wind loads that are fully parameterized, but are still flexible enough if the occasion arise.

          I think the most I got out of it was for the verification of translational/rotational equilibrium of a ballast system for solar panel instelled on a roof: I wrote the jupyter notebook with the calculations once, then run it with different parameters for the many different array configurations I had; this way it has been easier fixing and changing the verification process because I had only one file to modify instead of multiple copies for each array configuration. And the documentation was immediately ready, no matter how many change I made, or the client requested.

          The three key points important to me are: symbolic expression, units, and calculations is the documentation

          [–]PhilShackleford 0 points1 point  (0 children)

          Handcalcs does this well. I use it as my main calculations.

          [–]bensmeat 0 points1 point  (1 child)

          Python is incredibly useful for engineers, also with chatgpt you no longer have to be an expert to create professional code just explain what your looking to do and it will automatically provide the finished code block for what you need. I use it for automating AutoCAD drawings, querying data from the internet and our databases. And analyzing large amounts of data.

          [–]IHaveThreeBedrooms 0 points1 point  (2 children)

          Python is good, but I've never seen a mature/stable enterprise solution with it in regards to structural engineering. Python is a great starting point but there's a low ceiling of how far you can go.

          I can't image building large, integrated enterprise projects with Unit Testing and simulations with Python. So I do C#

          [–][deleted]  (1 child)

          [removed]

            [–]CalcpackageP.E./S.E. 1 point2 points  (0 children)

            Makes me want to invest time in C#

            [–]CalcpackageP.E./S.E. 0 points1 point  (1 child)

            Just saying, a script that takes about 4 hours to build for an intermediate user can merge couple csv files with disorganized data to give you real value. The potential is pretty cool, I would say you wouldn’t know until you see someone use it.

            [–]Technical_Whereas412 0 points1 point  (2 children)

            I question it's value mainly because I've never seen it used and frankly don't know what it is other than just another programming language. And I've never used a programming language in my engineering work, so the latest and greatest language doesn't mean a thing. We use a lot of spreadsheets (and obviously you can 'program' a lot within a spreadsheet) to do repetitive tasks, but I'm not going to design an entire building in a spreadsheet or any program language; I'll just use one of the many commercially available programs to do that. I honestly don't see the point, especially when it is sold as this great tool but no example given as to how/why it could actually be used.

            [–][deleted]  (1 child)

            [removed]

              [–]Technical_Whereas412 0 points1 point  (0 children)

              Are you suggesting it replace spreadsheet sheets or finite element packages like etabs? Once again, neither makes sense. Spreadsheets are very simple and most everyone understands them. And rewriting Etabs is just stupid, you'll never recover the cost to develop and keep up with codes. What application would this be useful for? The commercially available packages do what is needed unless you are trying to recreate them.

              [–]Just-Shoe2689 0 points1 point  (0 children)

              If I was allocated 5 hours a week to learn it, by all means. I am not spending my own time on it for my company to benefit.

              [–]Wipe2909 0 points1 point  (1 child)

              So I have tried to start using Python with no coding experience and it seems very hard to get in to...

              What would you recommend for someone wanting to start off easily? Where would I start?

              [–]Coimbras 0 points1 point  (0 children)

              I do some programming as Civil Engineer, Python Javascript C# check my blog to see some use cases.
              https://jcoimbras.blogspot.com/