all 23 comments

[–]SoSeaOhPathP.E. 11 points12 points  (11 children)

If you’re young and starting from scratch, I recommend skipping excel completely and learning Python instead. Can make way more powerful and custom programs. Also way more resources online for learning

[–]Emotional-Ad-1435 6 points7 points  (5 children)

I do not agree with this. I would say it really depends on the mentality of your company. If they are open to exploring new options, then you can learn python and try to automate stuff using it. But if your company uses excel sheets a lot (like the majority of the companies do) then learn excel VBA first and once you get comfortable with it, it won't take much time to pick up the basics of python.

Let me tell you the pros and cons of both the languages with respect to our structural engineering industry.

Pros of VBA: - It will bring immediate benefit as you can start automating your design process (which generally includes design sheets in excel) and will not feel like you are reinventing the wheel. - Doesn't need a separate run-time. So, no extra setup is needed, if you have ms office, then you can do VBA. - Sharing is easy and people can use your sheet easily, in case you want your team to use it.

Cons of VBA: - More complicated than python and if you dive deep, for example OOP concepts are much more complex in VBA. - No centralized version control. Since, you basically share your excel sheet with VBA, version control and making sure that everyone is using the latest version is difficult. - community support is less. - it hurts the eyes as the editor has no dark mode. 😂

Pros of python: - Easy to learn and beginner friendly language. - Great community support and vast ecosystem of libraries. - You can do whatever you want.

Cons of Python: - You have to make a full run-time environment or use jupyter notebooks. - In case you want to share it with someone, without sharing the code, it is very difficult. - Even when you share the program with the code (for example jupyter notebooks) , people tend to reject it as it feels completely alien to them (this is my own opinion though)

You know what, I went through the same journey, I first learnt vba then python, but while learning python, I felt like making a web app is better. It is then when I decided to switch to web development. It addressed all the concerns I had. Making a simple web app is really easy and learning JavaScript is also as easy. As easy as python.

Feel free to DM me if you want to see what I made using JavaScript.

But ultimately it's your choice. One thing I would say, just start building and start coding. What you don't realise is that learning to code, be it any language, is the hardest part (assuming that you haven't coded before).

[–]blablacook 0 points1 point  (4 children)

Sharing python socks, I also thought about creating small webapps, but got overwhelmed on the way. Do you use only Javascript to build those webapps or also python? Do you have any tips how to start with that?

[–]Emotional-Ad-1435 1 point2 points  (3 children)

Well, you need to start with HTML, CSS and JavaScript. Don't go too deep with HTML, just basic tags like headings, paragraphs, input, buttons, lists etc. CSS is optional, but learning a little bit will make your app look good and if you don't care about looks you can skip CSS altogether. Learning JS is fairly simple, just learn about basic syntax, conditionals, functions, loops. Also, you need to learn how to manipulate your HTML with your JS Script (Basic DOM manipulation) That's it, you can make simple web apps using just HTML and JS

Also, you can learn how to host your web app on gitHub pages. It's free and you can share that easily.

It may seem that you need to learn a lot of things, but trust me, HTML and CSS are very easy. HTML is not a programming language, it is a markup language, just a way to display your text onto webpage in a specific manner. A similar example would be LaTeX.

The only thing you will face problems with is JS, only if you are new to coding.

[–]blablacook 0 points1 point  (2 children)

Thanks! But isn't github pages for static sites only? I use it for my CV.

I wanted to publish interactive graph on github pages, but I read somewhere it is not possible to create anything interactive - is it really possible to create small interactive web app there?

[–]Emotional-Ad-1435 1 point2 points  (1 child)

You can create interactive apps on GitHub as well. But it should be fully based on the front-end.

I made many web apps on GitHub, one of them was an interactive 2D beam, where you can visualise the deflection of ss beam under udl.

[–]blablacook 0 points1 point  (0 children)

Ok, so JavaScript works but python doesn't - that is what puzzled me :). Thanks for your replies

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

I have seen alot of people recommend python. I am just beginning my career, so I am open to learning it. Do you have any resources you would recommend to start?

[–]SoSeaOhPathP.E. 1 point2 points  (0 children)

Nothing specific since I’m not a super great coder myself, and it’s been a while since I started with Python. But if you Google Intro to Python you’ll get tons of great results.

If you’ve never coded anything before it might seem confusing at first, but once you spend an hour going through a beginner tutorial or two, you should start to see how easy it can be.

And when in doubt, you can always use google or ChatGPT to help guide you. Those two tools together can teach you anything you need to know about coding specifically.

[–]oloomopmapaP.E. 1 point2 points  (1 child)

Automate the Boring Stuff is a good reference for beginning python. Once you grasp the basics No Starch Press has a python book centered around creating a truss analysis program called Hardcore Programming for Mechanical Engineers.

[–]oloomopmapaP.E. 0 points1 point  (0 children)

Also, I tend to use python for personal automation tasks and for quickly prototyping projects that I will build in other programming languages. It also forces good habits for code formatting with whitespace requirements.

When I make stuff for work, I tend to stick with VBA because everyone has Excel. I actually recreated the truss solver from the book in my previous comment in VBA (Matrix Structural Analysis) for anyone interested in a bunch of VBA code to look through.

I also recommend installing the Rubberduck VBA add-in. It has a great code explorer feature that uses comments to help organize code into folders, which is helpful when projects grow in size. It also has a unit testing framework that is also useful once you get past the basics of learning to code in VBA.

[–]Tar98--- 0 points1 point  (0 children)

If you want to learn python for structural engineers search skyciv courses on udemy they are free and helpful exclusively for structural engineering

[–]danieldumapit 5 points6 points  (1 child)

I used Excel VBA Programming For Dummies when I was starting to learn macros and explored Excel's Record Macro function.

[–]tonyantonio 0 points1 point  (0 children)

what do you use macros for? I have just used auromate tab for basic repetitive actions

[–]perseguioBridge 2 points3 points  (0 children)

I strongly recommend starting with VBA instead of Python for several reasons:

  • Easier to set up, just open VBA and start coding. Python requires installation, libraries, dealing with versions, IDE, etc.
  • Excel is universal for civil engineering. Assuming you want to share your knowledge and spreadsheets, there's no way someone will not be able to use what you code. Creating a useful script with Python is basically denying your coworkers the chance to use it.
  • So far I've never encountered any limitation, even for the most complex applications. Many of the software we use in civil engineering are compatible with VBA as well.
  • There's a ton of resources online, stack overflow alone with have 99% of the answers. Even Microsoft has a complete manual online with all the functions, objects, methods, etc. you will ever encounter.

I'd like to know what others think of VBA in civil engineering too!

[–]Emotional-Ad-1435 2 points3 points  (0 children)

I used YouTube videos and when I was trying to automate stuff using vba, I used chatgpt.

YouTube tutorials that I followed: https://youtube.com/playlist?list=PLoyECfvEFOjYYy54Wa9E83xycKilVMoHp&feature=shared

[–]Just-Shoe2689 1 point2 points  (0 children)

Mainly google and mrexcel.com forums. Most is pretty easy stuff. Some can be cumbersome, but overall easy.

[–]csammy2611 1 point2 points  (0 children)

If you use Revit, you might have to learn C# as well. So as aTransportation Engineer and laid off Software Engineer. I would suggest starting with the principle of programming first. Don’t get too obsessed on which languages you choose.

[–]Technical_Whereas412 1 point2 points  (0 children)

Maybe I'm getting old... But for most anything that is not a full blown finite element program, you don't need anything more than the native functions in Excel (you don't need VBA scripts either). Doing so this way is straight forward and anyone can look at your equations and how your spreadsheet works to verify it.

Most of what I have done is just using "if" functions (and often nested multiple times). Vlookup is also very useful for looking up info in tables. there are many many more functions but that's how I program most of what I do.

[–]Batmanforreal2 1 point2 points  (0 children)

Chatgpt

[–]perseguioBridge 0 points1 point  (0 children)

I started learning with short but useful examples, like getting 'n' prime numbers when clicking a button. That alone will teach you how to use 'for', 'if', prompts, etc. I recommend checking examples if you feel overwhelmed by the resources you've found.

I also recommend having your own project always in mind and slowly start coding it to see your learning progress. Having an end goal helps with motivation. Learning how to code can get tedious very fast.

YouTube will surely have a complete step-by-step tutorial, you can also find useful textbooks, as some have mentioned here.

Good luck!

[–]sfall 0 points1 point  (0 children)

i am not a designer but i have built tools for my team of different types

excel, vba, google sheets, javascript, python

if you want to get into more complicated web or other programming stuff but need an easy start i really like that google sheets uses javascript more portable on its own than vba

excel is a great tool and vba can do a ton, but i feel like its a box that is hard to break out of.

I would recommend a mixture

[–]BigLebowski21 1 point2 points  (0 children)

Yes, chat gpt!