You often hear about architecture and software.
This could be things like microservices, three-tier apps, or even the dreaded client-server mainframe app.
But in this episode, we're turning this on its head.
It's software and architecture and real-world construction projects with Mark Menendez.
This is Talk Python to Me, episode 162, recorded April 23rd, 2018.
Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
This is your host, Michael Kennedy. Follow me on Twitter, where I'm @mkennedy.
Keep up with the show and listen to past episodes at talkpython.fm.
And follow the show on Twitter via at Talk Python.
This episode is brought to you by Linode and ActiveState.
Check out what they're offering during their segments. It really helps support the show.
Mark, welcome to Talk Python.
Thanks, Michael. Thanks for having me.
Yeah, it's really great to have you here.
I'm super excited to have this conversation with you and explore an area that I really haven't spent a lot of time in,
certainly in a software perspective anyway, in the whole architecture and construction building area.
Should be fun, right?
Yeah, definitely. Looking forward to it.
Yeah, it'll be great.
Of course, as usual, before we get to that, though, let's start with your story.
How do you get into programming in Python?
I have a background in physics.
From Colorado School of Mines here in Golden, Colorado.
And I just had an intro computer science course where I was taught by the venerable professor there of introductions.
And he heavily pushed Python right off the bat to everybody.
And it was kind of from there that I took a few more computer science courses and things like that and followed down the path to doing a lot of programming.
Yeah, that's really cool.
And the fact that you got to do it in Python is super nice.
I mean, when I went to school, it was, you know, I had to plead to do stuff in C++.
It was either you have to learn Fortran.
It's the most important language you're ever going to learn.
Or we think you should learn the foundations in a language that nobody knows.
So it's, like, confusing to everybody equally, which was Lisp.
And neither of those were, like, really amazing choices.
And I never went on to, like, use too much of them, I guess.
But, yeah, I think C++ and Python would have been a lot better choice.
Yeah, definitely.
So I had courses in both of those.
So, you know, got a bit of statically typed things and got a bit of dynamically typed things.
So it was good.
Good background.
Yeah, yeah, really nice.
So what are you up to now?
What do you do day to day?
Yeah, so now I'm just, you know, supporting a lot of firms in architecture, engineering, and construction.
And that consists of a lot of authoring requests for proposals and things like that.
And trying to make sure that, you know, clients are otherwise provided for with respect to automation of workflows,
more cutting-edge solutions in the AAC industry as it relates to building buildings.
And how we can program to help that be done more efficiently.
The company that you work for is basically, like, a software consultancy for architecture, building, industry?
Yeah, that's right.
So I guess I should, you know, provide some context into that a bit.
So I work for, like, a firm called Evolve Lab.
And so it's a building information management consulting firm.
So anywhere where there's building information, that's kind of what we're consulting about.
And so whether that's how people procure their building documents or how they draw buildings in three-dimensional space,
how do they manage all of the data that's tied to all of those elements.
And that will be the general context of anything that we consult in.
And that can also relate to things outside of the building, such as, like, site.
And so we'll do stuff with, like, GIS and things like that.
And also related to, say, like, efficiency or, like, solar analysis.
So, like, which directions the building is facing in, things like that.
And it's kind of driven by two main things, which is, like, the building design and then kind of, like, the life cycle of the building.
So it's, like, how do you manage all that data while building the building in electronic space to how do you design the best building possible such that you're not wasting a ton of energy after it's starting to operate in the field?
I see.
That's really cool.
So working on, like, the LEED-certified type buildings and stuff like that.
Yeah, definitely.
All through that life cycle.
LEED maybe is a U.S. thing.
I don't know.
Maybe tell – this is people from other countries might have no idea what LEED is.
Maybe tell people what that is.
And LEED might be international.
And I'm sure it's internationally known.
But it's something where you can get an accreditation stamp onto your building of, like, how energy efficient it is.
So they have all these ranks of, like, gold and, you know, highest is, like, platinum, LEED platinum.
And there's all these certifications behind it to making sure everyone knows what is required to get these accreditations and things like that.
And so, yeah, to provide the context again, I guess as a consultancy, you're kind of saying, like, the firm will come to you and say, this is what they want to accomplish because this is what they would like.
If they were, you know, searching for, like, a LEED accreditation of something in particular.
And then we would go about helping them get to that point without wasting too much, like, manual hours just, like, tweaking their building design and stuff to get that stuff figured out.
It can all come up a lot more organically.
Yeah, that sounds cool.
So you have to have maybe certain levels of efficiency for various, you know, energy retention or insulation or whatever.
And do you run, like, simulations to say, here's how much we think, how much energy this building is going to use, how much sun energy it's going to capture, and how hot that'll get or how warm it'll keep it in the winter, things like that?
Yeah, definitely.
So there's, like, a whole bunch of different softwares that, and a lot of them will be, like, proprietary softwares that allow you to find all these different metrics through this process of just taking the building information model that you've created and then passing it over into the software and having it analyze it.
And then kind of what's new in the industry and where everything's going and the reason why, like, we started talking about doing this show is that there's very much a push towards things called, like, generative design or, like, artificial intelligence in building information management where things can be possible now where you say, like, okay, let's make all these certain degrees of freedom.
Like, we'll say this building can gain five levels or it can rotate on this site or, and this is what the site is.
And then it's, like, how do you take those certain degrees of freedom and not only, like, move them through all those degrees of freedom but also start to analyze every single metric that can come from all of those different options.
So, like, you know, to tie it back to lead, say, for one thing, for instance, is you'll have, like, for a lead accreditation, there could be something or you're this far away from, like, a light rail or something like that.
And so then say your site has a bit more emphasis on it, but, like, the main entry point of the building has to be, you know, so close to this light rail that if it's rotated and the main entrance is opposite of where the light rail is, it'll be too far.
And then if you move it the other way, it'll be closer.
Well, like, that will be, like, one of the weighting metrics where, like, as it rotates, you see, oh, look at this.
We just lost a point or two on our accreditation.
But maybe you gain it somewhere else.
And it's for somebody to go through and, like, rotate their building or, like, to manually draw things is just totally impossible.
So you go through this, and the industry is going through this now where we're starting to manipulate models on this more abstracted level and saying, how do we generatively design these things such that a lot of these things are just taken out of the box just based on whatever you want.
That makes perfect sense, but I had never thought of machine learning and AI being applied to buildings.
I mean, certainly not in the building of buildings.
I guess it makes a lot of sense, though, right?
There's so many things you're trying to optimize.
There's so many different factors.
And, of course, it makes sense to just apply some kind of algorithm that can, you know, smartly answer what's the best way to arrange all these things, right?
To be very specific about this, it's, like, one thing that you can apply, like, you know, AI or machine learning to in building.
I mean, so machine learning and AI, like, so for machine learning, we're going to have way bigger data sets and all of this stuff, which I think is going to be in, like, a second part of what we're talking about here.
But so, like, for artificial intelligence, if you take something even as simple as, like, A star algorithm, it's like, well, how could you use that?
Like, and, you know, like, pathfinding algorithms and things like that.
Well, so if you, like, you know, you look above your head, like, anywhere you are in a building, there's, like, ducks and there's all these supplies and stuff.
There's air coming out of the ceiling, you know?
It's like the building is breathing.
But there's also, like, water and all of this stuff being supplied to sinks and things.
So it's like all of these pipes and all of these ducks and stuff are all going through the ceiling.
They're all flying around all over the place.
And so if you have a pathfinding algorithm and you have all of your ducks modeled already, then, and you want to say, hey, I want to model this pipe and I want to start it here and I want it to end over here.
Well, you know, you can manually, like, go through and you can rotate your model, like, 50 times and, like, look and say, okay, I got to go up a little bit over here to get over this duct.
Because if it's clashing through it, and so, like, yeah, to take a step back even, it's, like, buildings are being built before they're actually built in the real world now.
Like, almost fully, that's what every big general contractor is on it.
It's, like, the whole building to, like, a T, you know, to, like, within inches is completely modeled out on the computer before you're even in the field at all.
And so this is called clash detection.
And so anytime there's, like, a pipe that's clashing with a duct, it alerts you and you say, okay, well, hey, we have to move this pipe up or down so that it's not going to be in the way of the duct.
And so that before you get out into the field, you know that you have to model or you have to order these extra pieces of pipe because you know you're elevating over this certain duct.
And so to bring AI back into it, it's, like, well, you know, you can have more, like, AI routines that are modeling out your pipe and making sure you can get most efficiently from one point to the next while avoiding all these certain obstacles.
Right, maybe, like, going down an entirely different wall and completely doing something different down at the bottom, like, actually opens up something in the rest of the building that makes it way more efficient or something, right?
Yeah, and for humans to do it, it's, like, so difficult.
Like, to model all of it's just so time-consuming.
That's really fascinating.
I mean, just, I could totally see how it just all applies now.
But when I think of buildings being built, I think of, I do think of, like, CAD software and stuff.
But I feel like, I just imagine, like, draftsmen sort of sitting there just doing it, right?
No, we've got to move this here and draw that line there.
And, yeah, it's quite fascinating.
So it's probably a good time to start talking about some of the Python code that you guys use.
So maybe give us a quick flyover of the type of software you're using for this.
There's a certain amount of it that's now being done on the web development side.
And so this is going to entail, like, I don't know, just some framework, you know, like Flask or Django or something, where we can quickly and easily set up databases and dashboards.
Because as you start to develop all of these models, there's a lot of things where, say, like, for even one wall, for instance, you have all of this, like, just, you know, you have insulation, you have, like, the paint that's going to be applied to all this data.
And so all this data wants to be saved now back to a database.
And originally, it was just kind of dumped at the end of every project.
You just save it.
It's just, you know, gone.
And then you move to your next project.
And really, no, there's no hysteresis about it all.
You know, there's no learning at all.
People just come.
They build the building.
And if the owner approves and the city approves, who needs to keep track of what paint was used or what, you know, material was used here, right?
Other than for, like, the main structural bits, right?
Yeah, more or less.
You know, it's just like that.
But now if it's in software, right, you can just save it.
It's easy.
Yes.
And so it's about moving to the cloud now.
You know, it's doing all of these things that the software development industry has been doing.
But now AEC is now catching up.
And so it's about building dashboards, building just ways of analyzing your data in the cloud to harness, you know, the power of cloud computing, essentially, and things like this.
So the biggest firms we've sent out, personally, like RFP or proposals and things for things such as building out big frameworks and decide making decisions on if you want to use Azure or something or like if you want to just have all of your own hardware.
But essentially, just providing value through building out like a Flask app or a Django.
Yeah, mostly like, you know, something that's going to be more minimal that you'll be able to keep using.
And on one side, that's what the Python looks like is very much just web development kind of stuff, you know, setting up all your database, doing all this stuff.
And then on the other side is more related to in-process information management.
So as you're building the building, you have to do certain things, you know, you have to like create views on certain angles and things like that where people want to see like all the people who are the building inspectors and whoever's giving you your permits.
They want to see and make sure that you're doing all of your like requirements for, you know, making sure maybe you have like a handicap stall in the bathroom or something, you know, like they want to make sure you have all of this stuff.
And so on this side of it, the Python begins to look very different.
And in some ways, it's very script like and then other ways, it can be more of like a whole program.
I think this is a good spot to kind of say like that recently there's been these things in the AC industry that have led to the ability to grow and to gain like, you know, computational designers or computational specialists where they'll be using things like Python all the time.
And so there's like visual programming languages and stuff where you can kind of drop nodes on the canvas, connect them together and do all this stuff.
And that's all well and good right off the bat.
But you'll very quickly need to like move to textual programming because it'll just they can't wrap everything for you for use in visual programming.
You really got to harness like that API yourself.
And so the Python there is in a couple different avenues and it's related to managing your building information.
And so it's going to be like rename all of these walls like something, you know, or automatically tell me all of the room dimensions of all of the rooms that are in this whole entire building and print it out to a report.
You know, all these kinds of things, they'll give you very small like you'll develop these very small like Python scripts where you'll be able to like run them and they'll be able to do this stuff.
That's cool.
Like what is the surface area of all the interior walls or something like that possibly.
Right.
Yeah.
Like how much paint do I need?
Right.
Well, what how many walls you have?
Totally, man.
And they're called like takeoffs.
You know, it's called a takeoff.
It's just like the GC is going to get a model from like the architect because the architect designs it and then he passes it over to the guys who are going to build it.
And those guys that are going to build it are like this is very real cost to us.
You know, we can switch from to the next and save, you know, thousands of dollars and it barely changes anything.
We want to know that.
And in order to find all of those surface areas of all those interior walls, you can't go clicking on every single wall and see what the material is in the area and like write it down.
And people do that, you know, and that's the scary thing is people do manual takeoffs.
And that's what we're here for.
You know, we are like going to support that.
Yeah.
It reminds me of a company I worked for a long time ago that had a bunch of scientists working there, PhD, master's type folks.
And they had a lot of these grad students that would come and do a bunch of manual things, really like quite manual.
And it's like, you know, over time, we would take some major thing that they were doing and we'd re-implement that in software and go, I know it took you a day.
Now you push the button and it's like 10 minutes or one minute or something like that.
And then you have your answer.
And they always said, if you do this again, you may be like programming us out of a job, but they just got more interesting jobs every single time.
Right.
It was just like these sort of super tedious manual things.
Like you'll find a better use for your time if you don't have to do them.
Right.
Oh, yeah.
It kind of blows my mind that people like will suffer through it, though.
Right.
They'll be like, I can't really script Excel.
So I'm just going to count these up, all 2,000 of them, you know?
Yeah.
Pretty interesting.
All right.
So one of my first questions that I want to ask is how many gigabytes, let's suppose I have a 30-story building, standard office sort of thing.
How many gigabytes is that?
And like all of this data you're collecting and like all the different things that's going on, like, is it pretty huge?
Sometimes you have things like that where you have like a 30-story building and sometimes the 30-story buildings are able to be compressed a lot better.
So your file size isn't really that big.
But you can almost have like, I don't even know, like it's such a crazy question because there's like all of this data that you never really see like in the background that if you actually harvest it.
Like you sort of all the stuff that you really kind of could put together about it.
You could go into terabytes, like definitely, you know?
Because if someone models – because like one project we're working on, for instance, is like a theme park in China.
And so there's like these crazy slides and mountains and stuff.
And it's like if you store all of those – like all of that data, you're storing every like vertex of the mountain.
You're storing like everything, you know?
Like every time and it can easily – but then, you know, even like the interior wall example that we had earlier, it's like you're storing the paint.
But, you know, whatever, the paint's like one small fraction of like what is that wall, you know?
You're not even doing half of it.
So it can stretch from very, very small shops.
Like one-person firms can have like a database of, say, 50 megabytes or something like that.
And then you can have like these big, big, big shops that are doing massive projects.
And there can be like campuses and things like that.
So like they'll have like six or seven different buildings and they all link together in a model and things like that.
And that can easily stretch to, you know, a terabyte or more where you're – and it just all depends on how much data you really want from it too, you know?
If it's something where it's just geometry, it'll be like much less than that.
But if you want all of the info, it can be more.
Pretty interesting.
You talked about Azure and the cloud a little bit.
So where are you storing this data?
Like how do you store it?
Is it in like a relational database?
Is it flat files and blob storage?
Some combination?
Definitely a combination.
Yeah, yeah.
Because with, you know, with the blob storage, you're going to definitely need it.
Because a lot of times there's all sorts of documentation that's held about the building outside of just like a single file or something like that.
And so – and this could be information related to like warranty information for equipment that the building owner is going to want like 10 years down the road or, you know, something like that.
But then there could also be information that can be easily stored in a database.
Like if you're tracking – like so an architecture firm came to us and said we want to see what our users are clicking and picking when they're using this software.
Because if you have everyone using – and all of their charts show that they're using all of these same keyboard shortcuts and stuff.
And then you have one person who's always using like some random ones that no one else is ever using.
Then you – it's very easy to say, well, this guy's probably spending a lot of time fiddling around like just being confused.
You know, so you can be like, okay, let's get him like someone to go in there and train him.
And so there's data like that where it's very much can be tied to like Postgres or something.
And you can just set up like your user and, you know, some SQL database.
And it says user and, you know, there's these functions you want to track.
And it just updates that database a bunch.
So a bunch of everything like you can do SQL databases and obviously there's a lot in terms of blob storage that you could need down the road.
I can imagine.
So that's some of it.
The other part is the actual creation of the building.
Like you talked about the computational stuff, people helping actually the design of the building, right?
Like these ML models and stuff.
What's the story of that?
It is awfully related to this like whole degrees of freedom that I was talking about earlier.
How like you can have just a couple things that have a lot of degrees or that have just like a couple degrees of freedom.
And that quickly just like compounds to just something, you know, exponentially difficult for you to do manually at all.
And so, for instance, there is like we did a project where it was like a stadium kind of design.
And there's just like this facade or just exterior of the building that had all of these like panels on them that had like aperture.
So if the aperture was greater, you know, like a camera, it would let more sun in.
And if it was less, it would let less sun in.
And so you take like just the surface of the building and you can map like a heat map across it of like where the sun is in some part of the day.
And then you know how all of those apertures need to be opened and closed such that you can still achieve this certain sunlight percentage that you want.
And so, you know, you can kind of visualize it in your mind as the sun crosses the sky.
All of these apertures are going to shift there.
Some of them are going to open.
Some are going to close.
And it's going to happen across the building like over the entire course of the day.
So that's something where it's like the combinations are endless.
Like you can never do it manually.
But to talk directly more about like the machine learning aspect of it, like things have been being done where you can take everything from like this abstracted sense.
So if you think of like an electrical system of a building, you have like these big transformers outside of the building that really they receive all of the power and then they'll send the power to the building.
So they get it straight from the utility plant and then that goes straight to the building.
And so you can think of everything as just in terms of these trees or these are hierarchies where it's like the first part of the tree is just the transformer.
And then that breaks off into these and that breaks off into this and that breaks off in this.
So every building has a tree behind it, just some hierarchy of electrical systems.
And so now you can start to analyze these trees.
Probably has that for water.
It has that for ducks.
It has that for all sorts of stuff, right?
Totally for everything.
And in architecture, even there's stuff where it's like there is a level and then within that level, there are departments.
And then within that department, there are rooms.
And then within those rooms, there's like, you know, something else, maybe like cubicles or something like that.
And so there's trees for everything.
And trees are very well studied for mathematicians and stuff like that and computer scientists that we think that's really the gateway to harnessing fully like machine learning or something is how do you start to just develop these trees, study these trees and get useful results from them through a machine learning model.
Yeah.
What machine learning frameworks do you guys have in play?
Us, ourselves, we just mess around with scikit-learn quite a bit.
But other than that, we're not really doing that much with it.
But we have, you know, friendly competitors and things like that that are, you know, taking that research to a next level for sure.
It sounds really fascinating.
So I'm sure that in 10 years, we'll see this in an entirely different place.
This portion of Talk Python to me is brought to you by Linode.
Are you looking for bulletproof hosting that's fast, simple, and incredibly affordable?
Look past that bookstore and check out Linode at talkpython.fm/Linode.
That's L-I-N-O-D-E.
Plans start at just $5 a month for a dedicated server with a gig of RAM.
They have 10 data centers across the globe.
So no matter where you are, there's a data center near you.
Whether you want to run your Python web app, host a private Git server or file server,
you'll get native SSDs on all the machines, a newly upgraded 200 gigabit network,
24-7 friendly support, even on holidays, and a seven-day money-back guarantee.
Do you need a little help with your infrastructure?
They even offer professional services to help you get started with architecture, migrations, and more.
Get a dedicated server for free for the next four months.
Just visit talkpython.fm/Linode.
One of the things that I want to touch on is maybe digging into specifically some of the Python packages and stuff that you're using.
But before I do, one of the questions I kind of want to more broadly touch on is, you know,
in certainly the other sort of data analysis, creational spaces, Python has been really moving in on it in the last five years,
you know, since 2010, 2012, and so on.
Is that sort of the same in the industry here?
Like, is Python kind of a relative newcomer, or has it been around from almost the beginning of Python?
So originally, like, AutoCAD, like all this 2D drafting where you're just drawing lines and stuff,
a lot of the routines were in Lisp.
And so everything was, like, done in Lisp.
And, you know, very few people did it and things like that.
And then as it transitioned to a new software and had new API calls and everything like that,
it was mainly C# bent.
And so all of the C#, you know, was done like that.
And then, lastly, all of these C# API calls were just abstracted to Iron Python.
And so everyone was able to then just use Python instead of having to use C#.
You know, they could use all of these.
They don't have to worry about compiling.
They don't have to worry about any of that.
They can just write up these little scripts and quickly, quickly test them over and over again
and making sure they work good, yeah.
That's pretty interesting.
So the extension, the primary extension API or whatever for the Autodesk tooling was in .NET and C#?
That's right.
Right.
And then either Autodesk or someone outside it somehow integrated Iron Python into this mix.
And now that just sort of cracked it open for the Python space, huh?
Yeah, definitely.
And it's called like the, I mean, the Autodesk software is called Revit, just in case anyone wants to know.
And it's free for students.
And there's the Revit Python shell.
And that's kind of like the first thing where, you know, you can get this little terminal and you can start to do little shell-based things with Python.
That's cool.
Do you have like a GUI window up and then as you type in it, it like is interacting with it, that type of thing?
Oh, yeah, for sure.
And it's got all the cool stuff, right?
Like autocomplete and all these things and syntax highlighting and stuff like that.
So now where it kind of is, is I use like Visual Studio Code and I can just have that up.
And then I'll have kind of, you know, Revit on the other side and I can edit my code and I just save it and I can run it.
And then I could just keep doing that over and over again in that kind of iterative way.
Yeah, that's pretty fascinating.
I haven't seen a ton of uses of Iron Python, mostly because I think a lot of the folks I talk to are doing like web development stuff.
And at that level, you're just kind of like, you're not really adapting some other massive application that's got an API.
You're just like writing from scratch or whatever.
But that's cool.
So how do you find it works?
Does it work pretty seamless for you?
Yeah, definitely.
I mean, there's a couple things where like you wish were better supported, but it's kind of, you know, Iron Python stuff.
Like, so like if you want to use NumPy, either it's like really difficult or, you know, it's just not supported at all.
And things like that, you know, are kind of like you got to make sure that you're working within the Iron Python ecosystem,
which is obviously like a lot different than the Python ecosystem in some ways,
especially how it integrates into these sort of API calls.
It sounds pretty interesting, though.
Have you looked at Python.net, which is like a newer project that's sort of trying to achieve the same goals,
but I think possibly reverses the situation where like Python is sort of controlling .net rather than Python embedded into .net?
I haven't.
No.
Thanks for the recommendation, though.
It sounds interesting.
Yeah.
I don't know if it works in terms of the integration, but it certainly is a pretty, it looks like a pretty interesting thing.
And I think it's sort of a, not a competitor, but sort of inspired by Iron Python not getting as much love as it could have.
So that's pretty cool.
All right.
So what are some of the other pieces of software there that you're working with in terms of the Python ones?
You have something called, what is it called?
Py OCC.
What does Py OCC stand for?
Python OCC.
Python OCC is a wrapper on top of geometry library.
That's, I think, the easiest way to say it.
And so there, so essentially like within the building space, you know, you need lots of different ways of generating geometric objects.
Because at the end of the day, that's what buildings are.
Just a whole bunch of geometric objects.
And so with things like Python OCC, there is a good initiative set there for taking a lot of these open source building formats.
And so that will be things like, so it's called like IFC, like interchanging, you know, file format, something like that.
And essentially Python OCC and, you know, what the initiative was, was allowing people to easily take these traditionally proprietary models and to bring them into an open source space.
And so Python OCC gives you the ability to, you know, a lot like 3.js or something where you're going to be able to generate geometric objects, you know, with these certain high level abstracted calls.
And right, Python OCC is one and then Shapely is the other.
And these are kind of both packages where they're just, they're really bent on not only giving you the geometry primitives, but also giving you more high level access to selecting things and storing information onto them and things like that through, you know, like different attribute API calls and stuff like that.
So one thing with Python OCC that was recently done, not by Evolve Lab, but another firm is like a tower generator tool.
And so you're able to quickly like generate all of these towers like through a web dashboard and just, you know, kind of like what we were talking about earlier, but on a very, very basic level.
And so this stuff is all done through Python OCC.
And if people want to get into the AAC space in a very Python driven way, this could be a very good entry point because it does already have some initiative in it that allows you to start working with building information models and to start harnessing that data through the Python ecosystem.
Yeah, it's really cool.
So you can create these 3D meshes or 2D splines or whatever, depending on Shapely or Python OCC.
One thing that's pretty interesting about Python OCC is it is sort of, it'll look at what GUI platform is available and adapt to it.
So it says, if you use the GUI part, the library automatically detects whether Qt via PyQt or WXPython or WX or Python XLib are installed and it'll just render to the right one, which is, that's, that's pretty wild.
That'd be written against three GUI platforms and just work.
It probably attributes a lot to like people that will really harness 3D CAD from like, they're not really that strong of a technical background.
Things like that, they probably had a big obstacle themselves when developing Python OCC that required them to try to push something out to handle that for people.
That's pretty cool.
It's just a neat example of like, well, you don't have to have this framework, I always can have that one.
So another thing that you talked about is this visual programming story.
There's something called Grasshopper.
What's the story with Grasshopper?
What is that used for?
What is it first?
Yeah, so Grasshopper is a visual programming language.
So, you know, similar to things like LabVIEW, you know, you drop all these little nodes on the canvas and then you can tie them together with little strings and you say, you know, this is the way that the data flows.
You know, it always typically flows like left to right or something like that.
But so you can take like this list and you can send it across and you can add to it all these other things.
And all you do is you put down like a list generator node and a plus node, you know, and it gives you that option.
Like you don't need to know textual programming to do it.
And so for Grasshopper, Grasshopper is written on top of a 3D modeling program called Rhino.
What's cool about these programs is they're free for students.
And Rhino has like a very generous like trial thing, too.
So everyone can kind of dig into it a little bit.
But it's a visual programming environment that's very bent on computational design.
And so this is kind of a big thing now is like how do you start to computationally design these buildings where before, you know, like we said, everything was a lot more manual.
Now it's a lot more driven by computation.
Is that for like the surface of the building?
I want it like rounded like this or whatever or what kind of part would you be computing that you're talking about?
Definitely.
So this is, again, like what I'm talking about where it says like computational design versus computational like information management.
And so the design part is going to be like the exterior of the building, how it's all like shaped and how it looks and all this stuff to achieve all these cool things.
You know, you can't it's hard to kind of like rotate your camera in the modeling program to like this certain angle and then like draw this line like in this certain way.
And then like, you know, like everything's like all like really weirdly bent.
And so through computation, you can kind of just drag a couple of nodes on the canvas and say, like, this is my start point, this is my end point, draw a spline through it.
Or, you know, these are all the weighted points in the middle and draw a spline through it as best you can.
And then and then now you have just like these slider bars that you can just shift left and right and it moves your points back and forth.
And now your spline's kind of adapting in these cool ways to make like a cool building design.
Right.
So that doesn't sound like there's any Python involved or any other textual programming language, but they seem to have the grasshopper Python enhancement.
So what's the tie in with Python to this?
They do have some textual programming because, again, these things are going to be really limited.
Like they're not really limited, but essentially anytime you want to just drag and drop a node, like there has to be someone making that node for you.
Like there has to be someone that like takes that API call or whatever it happens to be and abstracting it for you.
And so that's where APIs yourself.
And so, you know, some of it's with Visual Basic, actually, and then some of it's with Python.
And so you can go ahead and drop a node on the canvas and this is your Python node and you double click it or you otherwise open it.
And then now you just have like this embedded editor or IDE.
I see.
You just plug in a function somewhere visually and call this function.
A little block won't do it, huh?
Yeah.
At the end of the day, it's still a little block.
But if you double click this block, it can be like this massive, you know, program within it that gets a bunch of data and spits a bunch of data out.
And so that's going to be the Python plugin or the Python enhancement.
I see.
So that's pretty interesting that it could really empower people who are not really programmers,
but maybe need just a little bit of logic, a little bit of something that's a little more than the app provides.
And you can do that in Python.
Yes, definitely.
That's pretty cool.
So one of the things that I've been thinking about as you're going through this, you talked about energy.
So how much does things like renewable energy, solar, wind energy, things like that factor in?
Do you guys like do modeling of that type of stuff as well?
We had a big project with a general contractor called Mortensen, who's like, I think, number one solar in the world or US.
So they build these massive solar farms and they're like ridiculous.
Like they can like give power to the city of San Diego, like and things like that.
And so they have just like huge, huge solar farms.
And so this thing is so much different than, say, like solar panels on a roof.
So like the problem of fitting, like how do you most efficiently fit solar panels on some certain roof is quite solved.
Like, you know, it's already there.
There's probably like a website.
If you just Google it, you can like do it for your own house or something.
Right. Google even has Project Sunroof, I think it's called, where you can put in your address and it'll light up your house and show you like how much efficiency you would get based on their like own models.
Oh, yeah. So definitely.
And so, you know, there's not a whole lot of Python going on in that space.
Like there's not a whole lot of programming anymore.
Like it's all kind of done.
And, you know, obviously, like like I work for a professor that did a lot in solar research.
And so, you know, by no means is that whole field done at all.
Like it's so nascent in a lot of ways.
But for these massive, massive solar farms, you can kind of think that like if you take just a small, small subsystem of a very small fraction and you just shift all the solar panels like one inch away from each other.
Well, all the wires that are connecting all those solar panels just got one inch further apart.
And so now it's like spread across this whole entire thing is like you just put like a thousand feet of wire added to your project because you shifted these one solar panels in this very small fraction, like a fraction of an inch.
And so something like that is like back to like generative design and things like that, where it's like you need a computational way of solving this problem.
You know, you need to know like how much how close should they be?
You know, it's called like there's just some ratio is involved and stuff like that.
And so you can just shift them slightly and things like that.
And so what you can do is there's like something called SAM, the system advisor model.
This is done by NREL.
They just came out with a new release of it, too.
That's pretty cool.
And they have like a Python wrapper.
And so you can essentially make all the SAM API calls, which you give it the solar system, all the panels, however much panels you're using, all of that stuff and latitude, longitude, all of that stuff.
And SAM will give you back how much annual energy will be generated from that system.
And so now, like you're not only building out a framework for building all of these farms of solar and kind of shifting all of their metrics and figuring out how everything happens.
But you're also tying it into something that was, you know, developed by NREL that's very, very like systematic and will give you like true results on solar analysis.
And so to answer your question now is that like, yes, it's very much even beyond the building space and into things like solar, into things like wind and stuff like that, where you're pushing stuff out.
And if it's done computationally, you can see so much more.
That's cool.
So almost in the industrial, like the architecture of industrial things and plants and solar farms and whatnot.
Yes, definitely.
You talked about changing the wires.
Would that, do you know whether that would actually change the efficiency because the electricity goes through more wires and loses more energy or more of a construction cost sort of thing?
Probably a bit of both.
I mean, so definitely construction costs, like without a doubt, like that was the metric that we kind of tuned to was like,
there is a certain amount of like cost per foot, linear foot cost and stuff like that of the wire.
And that's directly tied to manual labor of like setting that wire up and even purchasing the wire because it's like you can buy the wire one day and copper costs you this much.
And then you can buy the wire the next day.
And when you're buying so much of it, like that small increase in the stock market or whatever of how much wire, how much the copper costs for that wire is going to increase dramatically.
So, you know, you want to be able to type in a number of how much the wire costs today.
And then that will also feed back into your system of what's the best thing to do today and how that investment will look.
Maybe in the future we'll have some sort of AIs predicting the price of the various construction materials over time and then suggesting the order in which we build it.
So you can like delay buying something for three weeks.
So it costs less.
Who knows?
Just do it, dude.
If you do it, like we'll just tell everyone, you know, in the industry.
There you go.
Like that would be amazing.
Sounds like a cool science project that people could do something fun with if they really wanted.
This portion of Talk Python to Me is brought to you by ActiveState.
ActiveState gives you a faster way to build and secure open source runtimes from your first line of code through to production.
Every second you spend building your Python distro or trying to secure your Python programs is less time spent doing the work you love.
You've got better things to do than trying to resolve dependencies or making sure that you tick off all security boxes when you ship to production.
Standardize on your Python builds so you can have less friction in the development cycle and you can deliver apps faster.
You can also get a unique server-side way to verify your Python applications at runtime.
Bake security right into your code without impacting performance.
Go faster, spend more time doing the work you love, and comply with your enterprise security needs.
Try ActiveState and see why it was chosen by IBM, Microsoft, NSA, Siemens, PepsiCo, and more.
Join millions of developers who trust ActiveState to build their open source language distros.
Visit talkpython.fm/ActiveState for a special offer.
That's talkpython.fm/ActiveState.
So one thing that really seems like it could sort of fit into this space is not exactly what you guys are doing, but you have some visibility into it, I'm sure,
is the Internet of Things and smart devices and smart homes, smart buildings, are definitely sort of catching on in a lot of ways, but not entirely.
And I feel like in these larger construction projects, there have to be awesome opportunities for like Raspberry Pi and other fun little devices that people can build with.
What do you think?
Oh, yeah.
I mean, without a doubt, like Internet of Things is huge in the building space.
Like it's just continuously growing.
And I feel like anyone who's like really interested in like some Internet of Things space, you know, like Raspberry Pi or like Onion Omega or something is like they should definitely contact us.
Because, yeah, I mean, you're right.
It's not moving as fast as it could.
But, you know, things like that and things like drones are like huge for the space.
Like if you're doing like historical renovation or something like that, you want to like scan the whole building to make sure you have everything exactly the way it is in your model on the computer when you go to like start your renovation drawings and things like that.
Where, you know, it's like it's huge.
Definitely like through drones, through microcontrollers, all of it.
Yeah, the little tiny, you know, $5 microchip things with MicroPython on it.
Oh, man, you could do some great stuff.
Yeah, definitely.
That's one of the – I have lots of ideas for lots of different projects and software and other things in lots of spaces.
But I'm really fascinated with Internet of Things.
But I cannot think of something that's not just like a trinket toy thing for my house or for some other thing.
I mean they look really fun to build but I don't know.
It seems like there should be something really amazing.
But I just can't think of something great to build that doesn't kind of already exist.
Oh, yeah.
Well, that last piece there is the hard one.
Like what doesn't already exist.
I mean everything exists a little bit.
But not a lot of things exist like through an enterprise level and through something where they're going to, you know, warranty this for an owner for 15 years or something.
But, I mean, if you can do something where you're just handling like occupancy of a room, it's like if you can smart turn off your lights like right when you need to and smart turn them on right when you need to, you're going to save a ton of energy.
Like, you know, it's just Google Earth Day like yesterday, I think.
And if you go to that Google link, it's just going to tell you all about how much energy everybody's wasting like in your zip code is what they said.
And so it's very much something where, you know, even that is like you can handle that.
But it goes even further, you know, like even so in a residential sense, here's something that here's something that can be very useful for people.
You know, I was hesitating if I'm like privy to share it, but I'm sure I am.
And so it's like, you know, it's something where like everyone in a lot of houses only have a single zone.
So say you have a two story house, it's going to get a lot hotter upstairs during the winter than it is downstairs.
And the opposite will happen during the summer is with the cold.
And so it's very expensive to add another zone to your house to say like, OK, well, I want to be able to shut these off separately.
And so you can take like a micro control and you can rotate your your register, your diffuser, and then it can turn it off.
And that can be done so much more cheap.
So if someone is able to like do it on an enterprise level, you know, with a certain amount of like warranty and certain amount of installation expertise and stuff like that, then they'll very easily be able to like move into every single home and save a ton of energy.
By doing this, because right now, if you want to multi zone your house, it's going to be like thousands of dollars.
And if you can do it with a micro controller in like very easily, then you're going to save people like their money back for sure.
Like within like the first year or something.
That's cool.
One of the things that I've seen that's sort of in that same scope is new vent covers that you can buy.
Like so your heating vent or cooling vent in your house, every one of those could be they basically have a little sensor on them.
What's the temperature?
And then they could partially open and close to sort of even out the temperatures of your house.
Right.
So you talked about like upstairs being hotter or colder.
Right.
Like it would dramatically shut the sort of vents upstairs just automatically.
So I want the whole house to be 72 or this room.
I want it colder.
This one out warmer.
It could like make that happen.
Oh, man, that's exactly what I was talking about.
You know, obviously, like you said, it already exists.
I know, but it's not the same.
Like I feel like a lot of these are big, clunky solutions.
And we're down to like $5 pieces of hardware, free software.
Like you could do amazing things in 2018 compared to what people did five years ago.
So I don't know.
I feel like there must like on the building scale, there must be even more sort of connected devices going on there.
There are for sure.
And it's something where this is like the reason why people from the development space
are moving into the AAC industry is because it is still pretty new.
You think there's a lot of opportunity for like really good software developers to come in and go, here's 10 unsolved problems.
I'm going to pick these two and go after them or something like that.
Definitely.
Like 100% that is the case.
And some of the problems I'd say are like, you know, things to solve could be prototyped out like at a hackathon or something.
And some of them are very large scale projects that require huge teams and stuff.
And so for instance, like a lot of the software is either like proprietary or open source.
And it's like this combating things.
And so that's one huge thing.
It's called interoperability.
It's like, how do I take my model from this program to this program?
You know, because right now they'll just dump it.
They'll just say, you know, they call it like the model drop chasm.
And so for instance, you know, this is one space where it's like if you come in and you're a very good software developer, you can just solve all these little micro problems, you know, and it can lead to this really huge solution.
But there's plenty of other things as well, like in, you know, revolving around like big data, artificial intelligence and machine learning where people who are much, much smarter than me could come in and can see the possibilities.
If shown how everything is like hierarchical or how it can be abstracted a bit for them, maybe they can transfer it over to a similar problem that they've had and solve that problem in like a good way.
Nice.
All right.
So maybe the final thing we will have time to touch on is the future of the industry.
So we've already touched quite a bit on machine learning and IOT type of stuff.
Another area in at least standard factories is robotics.
But I haven't seen too many robotics building actual buildings.
Maybe I just haven't paid attention.
But is that also coming there?
For sure.
You said it with the factories and stuff like that.
Like automotive industry is always what everybody points to.
And in our industry now is like, look what they did.
You know, and look what we're doing.
And one thing in particular that's very much catching on and spreading fire right now is like called modular construction.
So it's like how do you just prefab a building like and you just push out all of these like wall panels and then when you get in the field, you just put them all up, you know.
And I have like some really good friend that's University of Stuttgart Institute of Computational Design.
And he's showing me some of his research projects and they're just amazing.
And one of the things that he showed me was that there's like these robots that can climb across the walls and work together and they create these strands and stuff.
And we could put a link in the show notes, you know, and you can create like these really wicked like computational like just pieces, you know, in your building and things like that.
But they also have robots that are like brick laying robots.
You know, you can Google that.
And they just throw a ton of bricks into the top and then out the bottom is just like sheets of bricks like being thrown down paving this road.
And if you can take one that just grabs that like piece of wall that you prefabbed and it just picks it up and it places it where it's supposed to go.
And then it goes to the next one and places it where it's supposed to go.
Like everything is coming together where the.
Or like glass, glass, like glass on office building.
It all takes off of like this quality control, quality assurance stuff.
Like if you could get a robot that just does it over and over, you don't need to invest in like the coffee that's going to keep everyone alert enough to catching everything, you know.
And robotics is coming.
Like robotics is very, very huge.
And the automotive industry paved the way.
And it's just on the doorstep of construction.
I definitely see that.
That sounds pretty awesome.
I don't know.
It takes so long to build buildings and other construction projects now.
It seems like they could get knocked out really quick for at least certain parts of what's happening to them.
Definitely.
Like disruption, I think is.
Yeah.
More or less, right?
I mean, I'm thinking of like there's this creek that's not too far from my house that had to have a new bridge put over.
And it's like a two lane bridge.
You could probably jump across a creek if you got a good run at it.
It's not a big creek.
And it took like six to eight months to build it.
I'm like, does it really take eight months to build a building across like a 30-foot gap or bridge across 30-foot gap when it's only like 10 feet down?
It's not.
It can't be that hard.
Really?
Anyway, maybe robots will build the bridges.
The road won't be closed so long.
All right.
So final thought.
Maybe we've definitely seen the migration of people from an agrarian society of farms and stuff into cities.
And I think at least in the U.S., like 2% of the population does farm work, whereas it used to be way more.
And people are just packing tighter and tighter into cities.
We need more interesting buildings to solve that problem, don't we?
Definitely.
Yeah.
So I think there's got to be a lot of opportunity to build not just more buildings but to build them better in a way that like makes these larger, more compact cities nicer.
Yeah.
I definitely agree.
I spent some time in Hong Kong and, you know, Hong Kong's thing is like they just keep building higher and higher and higher.
And it's just how could that be better achieved, you know?
And it's like who knows, you know, cities of the future.
They have like, you know, maybe different little pathways and stuff between buildings or something, you know?
Like you can harness the space above your head in a better way.
You almost create like three-dimensional like sidewalks instead of just always walking to the ground level.
You have these different layers at which you can like exist in like sort of connect to the buildings, huh?
Yeah, yeah.
Because right now it's all wasted space like above your head between the buildings.
There's like nothing going on there.
Nobody flies there, you know?
It's all just wasted space right above you.
Yeah.
If we had flying cars, it would be a different story.
But we don't have flying cars, so let's use that space for walking, I guess, or biking.
Nice.
All right.
Well, that's a really interesting look inside the architectural building space.
Thanks for that, Mark.
So let me hit you with the final two questions before we get out of here.
If you're going to write some code, you already said VS Code is where you like to live.
Yeah, I love it there.
Yeah, nice.
And you use, of course, the Python plugin that Microsoft now put out.
It used to be by Don, but now he started working for Microsoft.
I listened to an interview about him, all about it, because it was really interesting.
And I also use Code Runner, which is an extension.
It's an amazing extension.
I don't know Code Runner.
What's that?
Yeah.
So it's called Code Runner.
You should check it out.
And it just lets you run your script.
It's with lots of different languages.
I know it's for Ruby, Python, probably JavaScript and stuff like that, too.
And you don't have to put the little shebang on the top of the script or anything like that.
And it's just all kind of IntelliSensed in a way.
And then you can just easily run your code.
And so you don't need to go to a terminal and type in .slash or anything like that.
It's just all Control-Alt-N or something like that.
And so it just gets you off and running right away.
So that's an extension, I'd say, to go a bit further into VS Code of what I'd recommend.
Yeah.
And a linter.
I use a linter, I think.
Very cool.
That's good.
All right.
And then notable PyPI package?
I'd say Python OCC for that one.
And like I said earlier, it's a wrapper of a C++ package.
And it gives you the ability to start to harness geometry in certain spaces.
And so you can build little cubes and circles and pyramids.
And you can take that much further into splines and all different types of objects,
which is very important in the building industry to be able to 3D model and to generively 3D model.
Very, very cool.
All right.
So it sounds like there's a lot of opportunity for people who might listen to this show,
who are programmers or at least technically minded,
to sort of break into the AC space and do some pretty cool things on the ML space,
IoT space, lots of different things, huh?
Highly recommended.
Awesome.
All right.
So thank you so much for being here.
Everyone who's listening, if they're interested in this kind of stuff,
where do they get started, do you think?
They're happy to reach out to us.
But they can also go to Autodesk's website.
And there'll be tons of information there with respect to different softwares to choose from,
if they're interested in doing all kinds of different things, or tutorials, training videos, everything like that.
All right.
Awesome.
Well, thanks for being on the show.
It's great to chat with you.
Thanks, Michael.
Bye.
This has been another episode of Talk Python to Me.
Our guest has been Mark Menendez.
And this episode has been brought to you by Linode and ActiveState.
Linode is bulletproof hosting for whatever you're building with Python.
Get four months free at talkpython.fm/linode.
That's L-I-N-O-D-E.
ActiveState gives you a faster way to build and secure open source runtimes.
From your first line of code through to production, check it out at talkpython.fm/ActiveState.
Want to level up your Python?
If you're just getting started, try my Python jumpstart by building 10 apps or our brand new 100 days of code in Python.
And if you're interested in more than one course, be sure to check out the Everything Bundle.
It's like a subscription that never expires.
Be sure to subscribe to the show.
Open your favorite podcatcher and search for Python.
We should be right at the top.
You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct RSS feed at /rss on talkpython.fm.
This is your host, Michael Kennedy.
Thanks so much for listening.
I really appreciate it.
Now get out there and write some Python code.
I'll see you next time.
Thank you.