Latest / AI Infrastructure / Validating AI output & Refactoring Infrastructure
Transcript
- 0:02Wow, I can see everything clearly now.
- 0:06Are
- 0:06>> are you do you have uh what do you call
- 0:09it? By focal
- 0:11now because you're
- 0:12>> I have no idea. I have I I don't I need
- 0:15to wear these for um for at the desk.
- 0:19It's different from far sight. Like I I
- 0:22don't need them outside. I can perfectly
- 0:25see clear in the distance, but not not
- 0:27like 70 cm.
- 0:29Um,
- 0:30>> yeah, I actually need glasses for a
- 0:32while. But now, you know, when I put
- 0:35them on and I see the screen, then I
- 0:37realize how bad it was, like how blurry
- 0:40actually my I was looking at.
- 0:43>> There's a a way around that, like just
- 0:45having a bigger screen and bigger fonts
- 0:47and
- 0:47>> Yeah. Yeah. Yeah. I definitely had like
- 0:50situations where I woke up and I just
- 0:52was like, I can't be bothered with this
- 0:53right now. Just up the up the font size.
- 0:56And then later on during the day didn't
- 0:58even realize that I've been, you know,
- 0:59working with the font size like this
- 1:03big.
- 1:06>> Cool, man. So, uh, yeah. How so now
- 1:09you're you can see better, you can feel
- 1:11better, you can work better.
- 1:14>> It's like I'm wearing binoculars, dude.
- 1:16It's like like like the screen is like
- 1:18suddenly right in front of my face.
- 1:21>> What? I think I have the opposite
- 1:23problem. I I I see better near without
- 1:26my glasses.
- 1:29>> Yeah. H So I was just trying to add to
- 1:34the to the AI infrastructure podcast
- 1:37notes about what to talk about. I wish I
- 1:40did this a bit earlier.
- 1:42>> I haven't really been adding anything
- 1:43there for a while.
- 1:45>> There's been a lot
- 1:45>> quite a lot of announcements, right?
- 1:47Yeah,
- 1:48>> there's been a lot. Um, I guess you're
- 1:52>> I don't have a lot of time, though.
- 1:54>> Oh, you're you're all in on Claude, so I
- 1:56guess you haven't even bothered with uh
- 1:58Open AI stuff.
- 2:00>> They gave me cuz I was one of those
- 2:02people that unsubscribed after the whole
- 2:05um Department of War situation.
- 2:09>> Oh,
- 2:10>> I I went to Chat GPT and cancelled, but
- 2:13then they said, "We'll give you a month
- 2:14for free, so I still have access for a
- 2:16month." And now people are all raving
- 2:18about uh for 5.4 being um you know
- 2:22fine-tuned for coding and being so much
- 2:24better.
- 2:25>> Well well I don't think they've released
- 2:27GBT 5.4 for Codeex. Codeex is the one
- 2:31that's optimized,
- 2:32>> but they believe they believe it won't
- 2:34because they basically integrated the
- 2:36fine tuning from Codex into it and kind
- 2:39of reduce reduce the confusion
- 2:42>> of of the all of the Yeah, that's at
- 2:45least that's Tio's theory, right? I did
- 2:48watch The first 10 minutes.
- 2:50>> This is where you get the news.
- 2:55>> Yeah. Well, that's
- 2:56>> it. To me it makes sense
- 2:58>> because like all of this additional
- 3:00terminology people were getting super
- 3:01confused if you were open opening your
- 3:03your LLM model selection it was like 20
- 3:07GPT options
- 3:09>> GPT 5.2 two 5.3 5.3 thinking 5.3 codex
- 3:145.3 codex ultra think
- 3:17>> it's like what are you what are you
- 3:19doing
- 3:20>> so on different models so so I wanted to
- 3:25ask you about do you use one model
- 3:28against another in your workflow I mean
- 3:31you showed me like months ago that you
- 3:33were doing something like that like
- 3:35>> yeah I was because I was getting
- 3:38>> uh sorry
- 3:39>> I was Because the problem was I was I
- 3:41was never I was always running out of
- 3:43credits on cloud, right?
- 3:44>> Oh, yeah. That's true. You're doing it
- 3:46as a means of necessity.
- 3:48>> Yeah. But now now I I I haven't even
- 3:52been able to, you know, hit my budget
- 3:55limits on cloud.
- 3:56>> Yeah. So that's interesting. So you were
- 3:59doing it you were using multi- aents
- 4:01because you're running out of credits
- 4:03though. So, I'm I'm thinking using
- 4:05multiple
- 4:07multiple different models might be
- 4:09>> constraint.
- 4:11>> Yeah, it might be a quality game because
- 4:13I'm I was actually a little bit shocked.
- 4:15I had this experience last week where I
- 4:19I uh I created a a PR. Of course, other
- 4:24people approved it without asking too
- 4:27many questions or I mean, it's human
- 4:29approval. What do you expect?
- 4:31your track record
- 4:33>> and and then I noticed that um like if I
- 4:36was if I was actually less trustful of
- 4:38AI and I honestly looked at this patch
- 4:41that I was contributing I would have
- 4:43realized it was a terrible mistake it
- 4:45was such an obvious mistake really like
- 4:47I I used env instead of environment for
- 4:50GitHub workflow and of course I didn't
- 4:52really test it because it was a kind of
- 4:55a trivial change but anyway long story
- 4:58short this this PR that I pushed that
- 5:02was AI generated was wrong and now
- 5:06that's just making me very it's just
- 5:08sort of like wrapped ripped my
- 5:10confidence apart
- 5:12and uh I'm just thinking like what can I
- 5:14what like what practical steps can I do
- 5:16to make sure I don't
- 5:19commit junk
- 5:22this has always been the job of uh CI/CD
- 5:25DevOps people like my job pretty much
- 5:27all the time is to set up llinters
- 5:29pre-commit and all this type of stuff.
- 5:31Whatever I can deterministically
- 5:33validate.
- 5:33>> Yeah, that that's that's the trick.
- 5:36Making AI deterministic or making what
- 5:39AI does deterministic though. The
- 5:42trouble is is that maybe I'm just
- 5:45casting shade on GitHub, but like GitHub
- 5:48actions is such a pain.
- 5:52The difficulty now there's action lint,
- 5:55but it doesn't capture like half the
- 5:57problems. it doesn't support like
- 6:00actions and
- 6:02>> I had the similar situation on Friday
- 6:06where I was like I was working on
- 6:12something related to a docker image and
- 6:17yes I remember uh we need to do
- 6:19immutable digest pins on the um docker
- 6:24base images so when we build using a
- 6:26>> file you're in a environment are what?
- 6:29>> Yeah. So, so we we we have like the .NET
- 6:334 8.0 tag which is immutable because
- 6:36security patches and so on, right? When
- 6:38Microsoft builds a new version, they
- 6:40just push it under that 8.0 tag even
- 6:42though
- 6:43>> it's a different image. So, they don't
- 6:45accept that. So, they were like, you
- 6:47need to use an immutable digest.
- 6:50>> And then I was like, yeah, that's a pain
- 6:51because now we have to do a schedule to
- 6:53always check if there's a new digest and
- 6:55bump our base images, right? It's kind
- 6:57of like security like check checklist
- 6:59security like do we're consuming from
- 7:01Microsoft. Uh
- 7:04>> yeah sure there's supply chain attacks
- 7:06that can you know
- 7:08>> I'm not a I'm not a fan of these
- 7:09immutusable
- 7:11hashes on on docker things
- 7:14>> but like if Microsoft's been compromised
- 7:16and their and their 8.0.NET net image is
- 7:19is insecure and therefore you're saying
- 7:21we cannot have I think this is the type
- 7:23of nonsense um you know
- 7:26>> type of security because you're actually
- 7:28aggravating the issue because now you
- 7:30expect the client to adequately keep up
- 7:33up to
- 7:34>> yeah anyway the point was that um with
- 7:38Sun we had built a beautiful GitHub
- 7:40workflow that was tested against uh brew
- 7:43installed uh docker buildex image tools
- 7:47to inspect the digest for the remote
- 7:49image to figure out if we were using the
- 7:51if there was a new digest. And before I
- 7:54actually, you know, remove moved the PR
- 7:57from draft to review ready, I asked um
- 8:00Sun, hey, you know, we can test this. We
- 8:03can run the Docker Ubuntu image here and
- 8:06we can run the the commands that you
- 8:08have in the in the in the GitHub actions
- 8:10workflow. You can we can run it inside
- 8:11the local Docker image.
- 8:12>> Yeah.
- 8:13>> Ubuntu. and it did that and it
- 8:15immediately broke and there were all
- 8:17kinds of problems with it because um it
- 8:19was a multiarchc um digest and it wasn't
- 8:23detecting the digest properly. it was
- 8:24using uh a template string that didn't
- 8:27work or something or
- 8:29>> Yeah. And then also it was using the
- 8:30docker build 0.19 whereas in in the
- 8:33docker um that was on my local then it
- 8:36it says oh it fails I I should do an a
- 8:38instead of trying to use a temp because
- 8:39you know when you do golang like docker
- 8:41you can do these template strings to
- 8:43extract certain fields. So you can you
- 8:46can do docker inspect and then you can
- 8:48pass in a template string and it will
- 8:49expect it. Uh but the thing was it
- 8:52didn't work and then I assumed it was
- 8:53because it was using the wrong version
- 8:54and I said you're using 0.19 the latest
- 8:56is 0.26 and the GitHub action is using
- 8:58026 and they tried that it didn't work.
- 9:00Anyway the point is yeah I got so much
- 9:02things wrong and even even today when I
- 9:05was like um let's you use a make target.
- 9:07So this is another very stupid security
- 9:09problem where we have sonar cube that
- 9:11lints bashcript and I'm vendoring a v a
- 9:16third party supplier
- 9:18>> vendoring okay vendor
- 9:20>> vendoring meaning I'm inlining it into
- 9:22my git because I don't want to do a curl
- 9:23during my build I want to use an install
- 9:26script and when in my pull request it
- 9:29was flagged with 32 um sonar cube issues
- 9:32and
- 9:33>> if I fix them then the next time I pull
- 9:35the vendor next time I update from the
- 9:37vendor script, I'm going to have the
- 9:39same problem. Right? So, I want to like
- 9:41allow list it. I can't say whitelist,
- 9:42right? I have to say allow listed.
- 9:45>> Thank you.
- 9:46>> I'm very
- 9:47>> The audience appreciates this.
- 9:49>> Yeah. Um, so so I have to I have I I
- 9:52have to the I mean to me the right way
- 9:53is to vendor it and get track it allow
- 9:56list it. Um, but that's going to take
- 9:59time because I'm in this organization
- 10:01not an admin. So I I have to wait for
- 10:03someone else to whitelist it. So anyway,
- 10:05I says let's let's use a make target and
- 10:09um you know let's make sure that we
- 10:11actually do the insecure thing which is
- 10:12we we um we curl it and with make
- 10:16targets you can specify a file on disk
- 10:18and if it doesn't exist
- 10:20>> it will basically run the commands right
- 10:22I mean they it will keep it even like
- 10:24>> I'm the number one make file fan here
- 10:26>> yeah so but the thing is when I asked
- 10:28son or opus I think it was opus 4.6 six
- 10:31and I said, "Let's use a make target."
- 10:32It came up with all these phony make
- 10:35targets to do a unsure local or
- 10:37whatever. And I was like, you don't need
- 10:40to do that. That's not how make file
- 10:41works. You can point it to a file
- 10:44target.
- 10:44>> And then it was like, oh, you're
- 10:45absolutely right. But you see, like
- 10:47because I know make file, I know what to
- 10:49tell it. Like I know this this makes no
- 10:51sense.
- 10:52>> It's funny how make files trip up a lot
- 10:54of people and and AI in some ways. But
- 10:57>> so I was I was I was all mighty. I was
- 10:59like, "Haha, look at AI. You can't be
- 11:01just a stupid wipe coder. You have to
- 11:02know how make files work." At the same
- 11:04time, I was wondering the issue really
- 11:06is the make file, though. Like, if make
- 11:08file wasn't this so cryptic.
- 11:10>> Oh, have you heard of redo? By the way,
- 11:12I sometimes use redo in my projects.
- 11:15>> I you were just talking about you you
- 11:17did your all your skills with just or
- 11:19something like that, right?
- 11:20>> No, not just. I used redo. It's a DGP.
- 11:23Anyway, so going back to the the quality
- 11:28thing. Okay, I I'm with you a thousand%
- 11:30that we should we should do less things
- 11:32in GitHub actions, do more make files.
- 11:35That's what I'm that's my mantra.
- 11:37>> That's not what I said, though. I just
- 11:38said that that we can validate some of
- 11:41it. Um, for example,
- 11:45>> we can validate, we can we we can ask
- 11:47the AI to do a little extra and say
- 11:50like, you know, it all looks good and we
- 11:52can push it and see it pass. But even
- 11:54then, we're not 100% sure. We can still
- 11:56use local Docker VMs with with Linux and
- 11:59and and try to use that to reproduce in
- 12:02Ubuntu. Oh, by the way, I wanted to say
- 12:04on the subject of pinning, the one good
- 12:06thing about pinning in a Docker image is
- 12:08that is that you're likely to speed up
- 12:10your Docker builds because
- 12:12>> uh using caches and and things.
- 12:14>> Yeah, you're more that's one sort of
- 12:18>> Yeah. of the churn.
- 12:20>> But you were basically you started
- 12:22saying that um it's hard to trust the AI
- 12:25outputs because it can we can still miss
- 12:27things and how do we validate it? Um
- 12:29>> yeah. So,
- 12:31>> but you have you seen Adam Jacob's
- 12:33latest LinkedIn posts about that?
- 12:39I think he's been saying the same thing
- 12:40like quite a few times which is like
- 12:42it's it's difficult to be in this like
- 12:45what's it called the the twilight zone
- 12:50the where you are still validating like
- 12:53you have a lot of manual code and you
- 12:55still want to control what the AI output
- 12:57is um and you're actually validating the
- 13:00code versus you're not validating the
- 13:01output you're not validating the result
- 13:04and and he had quite a few posts where
- 13:06he was going on about how people have a
- 13:08difficulty letting go of the code and I
- 13:11mean something we've been discussing a
- 13:12lot as well and I kept telling you like
- 13:14you know as long as we put the
- 13:16deterministic checks around it then we
- 13:18can uh do a lot more
- 13:20>> I don't understand the oh I think this
- 13:22is how you do it
- 13:24>> I don't understand LinkedIn
- 13:27>> there was a
- 13:28>> yeah I mean there's definitely like
- 13:30people who are into AI and cranking it
- 13:34out
- 13:34>> this one about Nick's like I've been
- 13:36programming for literally my entire
- 13:38life. There's um that one I think he's
- 13:41talking about the fact that it's really
- 13:44a big mind shift. Uh it wasn't that Adam
- 13:47actually a couple of reflections that
- 13:49one couple of reflections the third one
- 13:52below from Adam that one. Yeah. Yeah.
- 13:55that that's where he goes on and says
- 13:57like it's hard to if you have an
- 13:59existing large code base um it's hard to
- 14:02let AI go wild on that code base
- 14:05>> and it's more easy to just start from
- 14:07scratch and let AI build everything and
- 14:09just build all the loops around it and
- 14:11that make me think I think the first
- 14:12thing we need to do when we are adopting
- 14:14AI into a codebase is to ask AI to
- 14:17validate all of the user stories and
- 14:19build a very strong build hardness don't
- 14:21let AI build like modify the code let AI
- 14:24build all of the validation and make
- 14:27sure that the validation is correct
- 14:28before you let AI loose on the code.
- 14:31>> I think that a way to
- 14:32>> my my colleague um was using AI with
- 14:36some database flows and what I and he's
- 14:39a very seasoned colleague um he's been
- 14:42around the block. He's been he's been
- 14:44hacking since the 80s sort of thing. And
- 14:48I don't know, maybe he's listening to
- 14:49different podcasts and getting his
- 14:51information from different sources, but
- 14:53I was really impressed that he like what
- 14:56what do you what he did was that he he
- 14:59set up like a flow where he was he was
- 15:03using different personas like he was
- 15:05saying like you know I am a business
- 15:07analyst and I want this thing and then I
- 15:10am um a database designer and I want
- 15:13this thing. I am a QA engineer and I
- 15:16want this thing. And then he basically
- 15:18ran the problem through these three
- 15:21agents profiles to do his work. And I
- 15:24thought it was very impressive the way
- 15:26he he did that. I mean, have you have
- 15:28you done have you thought about personas
- 15:31and in your spec ledger and things like
- 15:34that? Do you
- 15:34>> No, but there is quite a few.
- 15:36>> I am a quality assurance engineer.
- 15:38>> Yeah. I mean, a lot of people don't like
- 15:40it. They say it's like it's like
- 15:42theatrics. It's like you're going to a
- 15:44play and it's like, you know, I'm
- 15:45playing house and balls with my like
- 15:47daughter.
- 15:48>> Yeah. Yeah.
- 15:49>> But
- 15:50>> though I do I I think the the probably
- 15:53the benefit really is that you have like
- 15:55a fresh
- 15:57context in two or three different agents
- 16:00just to cover.
- 16:01>> Oh yeah, for sure. I think I think it I
- 16:04think people underestimate how effective
- 16:06it is. I think because of these things
- 16:08are language models the context and you
- 16:12know that you create around them and
- 16:14clearing the context and having it with
- 16:17different perspective like you know
- 16:19creating these personas I think it makes
- 16:22sense I don't think we understand
- 16:23>> you've not you've not uh implemented
- 16:25>> I don't do that no I' also many people
- 16:28are yeah like I just said people don't
- 16:29really like that but I think it makes
- 16:32sense that I'm not going to do that at
- 16:33the moment for me right now the because
- 16:36There's quite a few announcements lately
- 16:37that really affect uh Spec Ledger's
- 16:40position a lot. One is uh Antropic
- 16:42announcing announcing like a um config
- 16:45management as a service so that you can
- 16:47share configurations uh for Claude Code.
- 16:50That's something that they launched.
- 16:52They added the scheduling. So people are
- 16:55saying ohropic just launched openclaw
- 16:58clone by making Claude Code run
- 17:00independently and can run schedule task
- 17:02which is a bit like one of the aspects
- 17:04of open claw.
- 17:06I'm actually surprised how long that
- 17:08it's it's taken like I still think
- 17:10>> Claude and Codex doesn't make it super
- 17:12easy to share things in an organization.
- 17:15>> Yeah. So so that's what Speckled Ledger
- 17:18does, right? I mean we have a superbase
- 17:20metadata where we are um allowing
- 17:23organizations to
- 17:25create skill bundles. I think Tessle
- 17:27apparently does that as well. I didn't
- 17:28know but like tessel they are not like
- 17:30we are the scale bundle
- 17:32>> uh solution to belittle anything but I
- 17:35don't think it's like a huge problem to
- 17:36share the prompts but like it it
- 17:38absolutely it's become an industry in
- 17:40itself
- 17:40>> it's just it's just one of those little
- 17:42things you know it's just one of those
- 17:44things you easily tack tack on if you're
- 17:46if you're going to provide a spec ledger
- 17:48flow and you're going to create a UI
- 17:50that that allows you to to visualize the
- 17:53process might as well includes you know
- 17:55skill bundles might as well include you
- 17:58part of the bootstrap of the of the
- 17:59repo. That's part of like
- 18:01>> some organizations they call it a AI
- 18:03readiness of a repository. Um across
- 18:06teams you need to set set up your repos
- 18:08so that they are ready for AI
- 18:10contribution so that anyone who starts
- 18:12working into it gets the best practices
- 18:14gets the the skills to to set up the you
- 18:17know everything. about talking about
- 18:19that and best practices and
- 18:21documentation. The one good thing at
- 18:24work is that it just took some
- 18:26convincing I feel took some took some um
- 18:31posturing but I I think I have the
- 18:33mandate to move everything from
- 18:35confluence or p confluence to markdown.
- 18:40I don't know if I've shown you this
- 18:41before but like yeah basically I feel
- 18:44this is going to make my life a lot
- 18:45easier.
- 18:47I hope you agree
- 18:49>> moving away from Atlassian is uh the
- 18:52sweetest uh AI move you can make really.
- 18:55>> I say that but then I spend the whole
- 18:56morning um create like playing with the
- 18:59J CLI Golang and writing a skill for but
- 19:03I'm right I wrote a skill very
- 19:04explicitly customized for all the custom
- 19:06fields and all the custom workflows for
- 19:08one board and one team that I'm in.
- 19:10>> You use the Atlassian um MCP. I know you
- 19:14don't like MCP. I don't like MCPS.
- 19:17>> It does work really well. This
- 19:18particular one, this super set.
- 19:21>> Okay.
- 19:22>> Though it's got some blind size like it
- 19:24doesn't work with
- 19:26uh what do you call these these these
- 19:29boards? White spaces. Not too sure what
- 19:31they call.
- 19:32>> Yeah. So, I guess it wouldn't work for
- 19:33me because that's exactly what I just
- 19:34did. I just took the Golang CLI that's
- 19:37like the most popular one and apparently
- 19:40hasn't received PR merge. So, I I forked
- 19:42it. I added the PR.
- 19:44Is it able to understand um a
- 19:46blackboard? I don't know what it's
- 19:47called in Atlas. Yeah.
- 19:49>> A white board.
- 19:50>> Maybe we're talking about a different
- 19:51thing like a conbon board is not the
- 19:52same as a whiteboard.
- 19:53>> Oh, no, no, no, no, no,
- 19:55>> no.
- 19:56>> This supports everything except a
- 19:57whiteboard and it it's really good and
- 19:59but I do notice that sometimes it
- 20:01struggles to do the markdown inside Jira
- 20:04because Jirro markdown has always been
- 20:06>> insane. I'm I I was very surprised
- 20:09because I always struggle with Jira
- 20:10markdown and then I see Cloud Sonnet or
- 20:12Opus create Jira tickets and with all
- 20:14theseh4 and all M's like what the hell
- 20:16is that and and then it just creates the
- 20:18tickets and I go oh that looks good.
- 20:22>> Okay.
- 20:23>> Okay. You need to share this skill with
- 20:25me but I'm pretty happy. I
- 20:27>> I asked a I asked Opus to highlight any
- 20:30sensitive info and it was like um
- 20:32enumeration of projects, enumeration of
- 20:34of statuses, enumeration like don't
- 20:36share this. I was like, "Okay, I won't
- 20:37share it."
- 20:39I was like, "Ai, can I open source
- 20:41this?" And and and it was like, "No." I
- 20:43was like, "Okay.
- 20:45>> I don't even ask myself anymore."
- 20:47>> Well, I I'm not too sure I've shared
- 20:49this with you before, but I'm looking
- 20:51forward to rewriting a lot of well, not
- 20:53rewriting, just dumping Confluence to to
- 20:56markdown.
- 20:57>> Nice. And then I suppose just to make it
- 21:01agent friendly
- 21:04uh to to make it like goal orientated so
- 21:07that uh
- 21:09>> yeah so that the agents will know what
- 21:12to do considering this this uh platform
- 21:15that I'm working on is compated.
- 21:17>> That's a big improvement.
- 21:18>> It's going to be a massive improvement I
- 21:20feel. um trying not to big it up too
- 21:23much, but it's just it's just so nice to
- 21:26work in a in a sensible way like with
- 21:28markdown and uh being able to easily
- 21:31edit things because just just the act of
- 21:33edit updating documentation and
- 21:34confluence is such a nightmare. I'm just
- 21:37sick of it for me. Um right now my focus
- 21:41is to maximize my output but also stay
- 21:44reasonable healthy. So, I'm more of like
- 21:47in the AI of Empire chart. I'm close to
- 21:50the first group of I'm not I'm not
- 21:52trying to burn out, but I'm trying to
- 21:54achieve slightly more than what I would
- 21:56be able to do if I was working full-time
- 21:59uh myself. So, I'm trying to use AI to
- 22:02to just hit more than what I my my
- 22:04regular output, but not insane. Not like
- 22:0610x um for for different
- 22:09>> Yeah, I guess. And then I try to I try
- 22:12to do this for the next few months
- 22:14before I don't know organizations
- 22:17>> every I'm feeling pretty ragged really
- 22:18in uh
- 22:21>> um though
- 22:23I I'm I am sort of trying to take a step
- 22:25back. I'm trying to be that uh force
- 22:27multiplier where I I on board my
- 22:30colleagues and and and with my learnings
- 22:33of AI, you know, just simple stuff like
- 22:36if we just put our documentation AI and
- 22:38then reference that a that documentation
- 22:40when we want something to be done, then
- 22:44we'll get there in a more reliable
- 22:45fashion. As for like building things,
- 22:48I'm definitely not on your uh wavelength
- 22:51at the moment just because
- 22:54well,
- 22:54>> I've taken a step back, I think, for the
- 22:56last uh
- 22:56>> Oh, that reminds me. I need to do that
- 22:58blog.
- 23:00>> I'll I'll do that. I'll do that blog
- 23:02this morning.
- 23:03>> SEO uh strategy.
- 23:06>> So funny.
- 23:06>> You should focus on CDKTF because I
- 23:08think it's there is a need for it.
- 23:11Actually, there is a need. Um
- 23:13>> yeah, I I just spent a weekend Oh yeah,
- 23:17doing well
- 23:17>> brainstorming on how to incorporate
- 23:22the L2 library. So I have Terra
- 23:24constructs right but I feel the name is
- 23:27too close to Terraform and and I feel
- 23:29the CDK terrain should have its own L2
- 23:33library. I I intend so terra constructs
- 23:35is more like a it's more like a proof of
- 23:38concept. It it shows that if you build
- 23:40those L2 constructs and you can port
- 23:41them from AW CDK it works really well.
- 23:44And now I want to port that effort and
- 23:46maybe start again but under a new name
- 23:48which is aligned with with with CDK
- 23:50terrain. So I was like brainstorming
- 23:52names like what is the L2 concept? Is it
- 23:55stratum?
- 23:55>> You must have had some level twos in
- 23:57there already somewhere. I just haven't
- 23:59looked
- 23:59>> in terrain.
- 24:01>> Yeah.
- 24:02>> Syndicate terrain
- 24:05doesn't really do level twos, right? It
- 24:07just does the init sorry it just does
- 24:09the initial L1 bindings and then Terra
- 24:12Construct is the full L2 library. And I
- 24:14always wanted to keep them separate
- 24:15>> cuz everyone has built their own.
- 24:17>> Yeah, when I think about it, you're
- 24:19right.
- 24:20>> There's a few like there's there's the
- 24:22concept of an archive. Um Oh, but you
- 24:24asked me a question. You asked me about
- 24:26like what is the difference between
- 24:27CDKTF CLI and why would you run the CLI
- 24:30versus running the same directly?
- 24:33>> And I was going on about it's the asset
- 24:35pipeline. It's the asset pipeline.
- 24:37>> Yeah. And you were going to you're going
- 24:39to show me how dumb I am about this.
- 24:44You caught me in a bad time.
- 24:47>> Well, okay. C can I just explain my my
- 24:51problem just so that you just let me
- 24:54just explain what I'm trying to do. We
- 24:56have a whole bunch of CDK and I want to
- 24:59refactor it so that
- 25:01>> is it CDK AWS CDK.
- 25:03>> Yeah, it's a CDK but I feel this is
- 25:06>> a CDK a problem that h would probably
- 25:09happen in CDKF whatever. So we we have
- 25:12we have many business divisions. They
- 25:14say there's 10 like it could be I don't
- 25:16know HR,
- 25:18commercial, whatever. Um, and each of
- 25:23them has their own dev staging prod
- 25:26and and with all these different
- 25:28domains, there's lots of shared uh CDK
- 25:31stacks and and and while we've been
- 25:34bootstrapping them, we've been just
- 25:35copying files across because SIM links
- 25:38are unfortunately a dark art. Um, and
- 25:42people don't want to use SIM links. So
- 25:44we've been copying files and then over
- 25:46time each file has been slightly changed
- 25:48or got some wide space or what have you.
- 25:50So we have like 10 sort of duplicated
- 25:54CDK
- 25:56uh apps I think is the correct term and
- 25:59we want to dduplicate it. So but already
- 26:03each each domain is quite complicated. I
- 26:05wanted to create like a like a shared
- 26:07library and then when I refactor some
- 26:10stuff into a shared library that when I
- 26:12do a CDK synth that I know it's the same
- 26:16in a sense because one thing that bit me
- 26:18with CDK refactoring is that I didn't
- 26:21realize that at least in Python that if
- 26:23you like put it in a different class
- 26:26then the name changes because
- 26:28>> Yeah.
- 26:28>> I mean that caught me out. So basically
- 26:31I'm having to rejig it again.
- 26:34>> Yeah. But what I I I don't want I mean I
- 26:36think
- 26:36>> I think that will be
- 26:37>> very difficult with with AWS CDK.
- 26:40>> What I'm trying to do is not have all
- 26:43these updates and deletes because I I
- 26:45just hate hate doing that. So
- 26:48>> So
- 26:49basically I'm doing a CDK sent and I'm
- 26:52like comparing it before and after to
- 26:53make sure that my refactor is is is a
- 26:56good idea.
- 26:56>> Exactly. So yeah I see refactoring which
- 26:58in terraform is a non-issue, right?
- 27:00because you change it and then you just
- 27:02put in a refactoring configuration and
- 27:04it takes care of the logical ID changes.
- 27:06What you just described is your logical
- 27:08ID of the resources change but
- 27:10physically the resources shouldn't
- 27:12change. They shouldn't be deleted and
- 27:13red recreated. Right?
- 27:15>> Yeah. Yeah. What in terform I've seen
- 27:18some people
- 27:18>> because Terraform state is accessible
- 27:21you can modify it. Cloud form is not.
- 27:23They added a lot of
- 27:24>> What do you mean like modify with an
- 27:25import or something like that? What do
- 27:26you
- 27:27>> Yeah, you can like basically for me,
- 27:28right, when I change my CDKTF
- 27:31drastically and I get the problem that
- 27:33you have, which is it's going to like
- 27:35change all the logical identities. Yeah.
- 27:37>> Um I I can I actually have a script that
- 27:40reads um I have two.
- 27:43>> I have one that reads the terapform plan
- 27:45diff and sees what it's going to create
- 27:46and what it's going to delete. It parses
- 27:48out the resource type and the logic ID
- 27:50and it tries to map them. If you have
- 27:52one resource type, exactly one create,
- 27:54one delete, it will map it one to one,
- 27:56right? So say that's one that's that's
- 27:57exactly the same one that you deleted
- 27:58and created and it's going to generate a
- 28:00move block for you. It's going to go if
- 28:02you have three deletes and three
- 28:04creates, it's going to sort them
- 28:05alphabetically and try to map them and
- 28:07say like those three they match. Most
- 28:08likely these are the way that they
- 28:10match. But maybe that's wrong. It's put
- 28:12a big fat comment in the top says review
- 28:14this because I could get this wrong. And
- 28:16then the the one if it's asynchronous
- 28:18like there's two deletes and there's uh
- 28:19one create then one of them is deleted
- 28:21one is kept. So which one do you want to
- 28:23create? You have to valid validate that.
- 28:25So that's what my Python script does
- 28:26that I created with Opus like three
- 28:28years ago. And you can do that very
- 28:30easily with Terraform. Um you can parse
- 28:32the plans you can generate those those
- 28:34refactor blocks. If you do that with AWS
- 28:36CDK it was three years ago very very
- 28:39hard. I literally people usually just
- 28:41delete the stacks and recreate them
- 28:43because modifying a ter cloud for stack
- 28:46is extremely hard but they did create a
- 28:50whole bunch of refactoring tools around
- 28:52cloud for that I never used in the last
- 28:55oh this is interesting
- 28:56>> I have no idea but yes there there's a
- 28:57bunch of announcements around that um so
- 29:00so this is where I would be looking if I
- 29:02was you um if you need to do these
- 29:04massive code refactoring and you can
- 29:06also Google for people facing issues
- 29:08with AWS cloud automation around uh and
- 29:10CDK specifically about logical ids
- 29:14because the moment you change things the
- 29:16logic ID changes and then cloudformation
- 29:18loses track of it and it says that
- 29:20doesn't exist anymore.
- 29:21>> I feel like an idiot. I I mean I've had
- 29:23this problem for a while and I didn't
- 29:24actually care to to do a basic AWS CDK
- 29:29>> refactor
- 29:30>> refactor search.
- 29:31>> I said three years but it's from
- 29:32September so it's not it's not just 10
- 29:34months.
- 29:36So this is the thing about cloud for
- 29:38>> three years and AI.
- 29:41>> Yeah. This is the problem with with with
- 29:43cloud form playing catch up with
- 29:44Terraform, right? I mean that's why I
- 29:46convince people that I think CDKTF is
- 29:48better than AWS CDK because these things
- 29:51only come into AWS like in cloud form
- 29:54now where Terraform started out with
- 29:55these things. Well, not really. The
- 29:57refactoring has only been there maybe
- 29:59for four years.
- 30:00>> Holy moly. Why didn't Why didn't I
- 30:02bloody Google? Yeah, but but come back
- 30:06to the reason why I was being so
- 30:08annoying to you about the pipeline.
- 30:11Um I can show you.
- 30:13>> I don't get it. Just don't get it.
- 30:15>> Yeah, I I'll show you what I think.
- 30:17Maybe we'll explain it, but then I have
- 30:18to go because I have another call. Um so
- 30:20I'll just share this real quick. So um
- 30:23can you see this like
- 30:25>> Oh yeah. So what I'm doing here is a
- 30:27comparison between CDKTF and AWS CDK
- 30:30because a lot of people don't really
- 30:31understand what's the difference between
- 30:33them. Right? So AWS CDK and CDKTF they
- 30:36both are a comment line interface and
- 30:39one orchestrates terraform execution a
- 30:42little bit and the other one
- 30:43orchestrates cloud form right you will
- 30:45agree to that right
- 30:50>> both of them have L1 constructs so when
- 30:52you use AWS CDK inside there's a whole
- 30:54library of the L1 resources that are
- 30:56directly the cloud for resources for
- 30:59CDKTF you have the same thing you can
- 31:01build the um L1 construct which are
- 31:04basically one to one. So if you have
- 31:06Terraform provider AWS, it has a
- 31:08resource called AWS instance. There will
- 31:10be an L1 construct called AWS inst or
- 31:13just instance and you can use that to
- 31:15create an AWS instance um configuration
- 31:18block in terapform right the same thing
- 31:20CFN resources they also have an L1. So
- 31:23that's actually nothing special. Now the
- 31:25big difference is that AWS CDK has an
- 31:28advanced asset pipeline which includes
- 31:30bundling. what the asset pipeline which
- 31:34which sometimes I feel shouldn't be
- 31:36there because it creates really annoying
- 31:38divs but carry on
- 31:40>> the asset pipeline does things like if
- 31:42you have a lambda function and it needs
- 31:45u python
- 31:46>> it builds a layer and everything yeah
- 31:47it's nice
- 31:47>> it can do the layering it can package up
- 31:50like if you have JavaScript or NodeJS
- 31:52package JSON with dependencies it can
- 31:55identify automatically that you're
- 31:56deploying into a lambda layer or into a
- 31:59lambda function runtime that supports
- 32:01AWS SDK version 3 and it will make those
- 32:05external. So when you bundle things up,
- 32:06it's going to automatically make sure
- 32:08that it doesn't bundle in the AWS SDK
- 32:10for you. It does a lot of amazing
- 32:12things. You get none of that in
- 32:14Terraform world, right? Unless you build
- 32:15it.
- 32:16>> It could be more amazing. I feel like we
- 32:18at work it we have a few stacks that
- 32:21build a lot of lambda layers and and I
- 32:23like I I don't maybe there's a trick,
- 32:25but I would like to say like these
- 32:27lambda layers are all effectively the
- 32:29same. Can you just make them share
- 32:30ahead?
- 32:31>> Yeah. And if you look at to rebuild
- 32:33everyone.
- 32:34>> So, so there's an amazing open source
- 32:36project from the AWS CDK team, uh, an
- 32:38internal team at AWS that built the
- 32:41construct hub. So, if you go to
- 32:42constructs.dev or construct.dev, you can
- 32:45see every single package on npmgs that
- 32:47have constructs. If they are tacked and
- 32:48licensed properly, they get
- 32:50automatically indexed and they have a
- 32:51nice documentation page made available.
- 32:53So, this this hub thing, right, it runs
- 32:56an a data ETL pipeline. And I think I
- 32:58really have to go uh but that thing runs
- 33:00a pipeline and it runs off bunch of step
- 33:03functions and lambdas. And inside that
- 33:05repo the if you go to the source code
- 33:08you can actually see that they use
- 33:09progen to generate a special lambda
- 33:11function generator that then bundles the
- 33:14code appropriately. So exactly what you
- 33:16just said they build it in there.
- 33:18>> Yeah. Progen is is a tool that that that
- 33:21manages a it's like CDK for file
- 33:23systems. So you can define a file
- 33:25construct and you can define um
- 33:27>> okay I'll have to have a look at well
- 33:29thank well okay you have to go you have
- 33:31to go so
- 33:33>> so that that's the main difference AWS
- 33:35CDK does CDK does so much more and CDKTF
- 33:39does only the very basic it the asset
- 33:41pipeline is actually it has the concept
- 33:43of an archive but that's not bound to
- 33:46like any provider because Terapform is
- 33:48decoupled from AWS right so if you do
- 33:50AWS CDK if you say an asset it will use
- 33:53ECR S3 for you behind the behind the
- 33:55scenes.
- 33:55>> Yeah, I mean that could be that could be
- 33:57a benefit because I do I do prefer basic
- 33:59in a way. I do prefer zip files than
- 34:01docker images.
- 34:02>> You do until you don't you do until it's
- 34:04done for you and then you say, "Oh my
- 34:06god, I wish I had this sooner."
- 34:07>> Yeah.
- 34:08>> The trouble with zip files is that is
- 34:09that Snick doesn't seem to like them or
- 34:11whatever security bloody thing people
- 34:13use.
- 34:14>> Oh, then you just base 64, save them,
- 34:16zip them again, 64 them, zip them again.
- 34:19Then no security scanner will detect it.
- 34:21Okay. All right. I I have to drop.
- 34:24>> Okay. Thanks, Vincent. See you, man.
- 34:26>> See you. Bye.
- 34:29>> Uh well, it's just me and
- 34:34I will publish as as a podcast. And if
- 34:37you're listening to this podcast, thank
- 34:38you and comment and like.
- 34:44I wanted to remind you that if you got
- 34:46this far, well, well done. though we
- 34:48also do have summaries on debates.com
- 34:50podcast
- 34:53and uh yeah please comment please get in
- 34:55touch if you like the podcast so we I
- 34:57can keep on uh being motivated to get up
- 35:00really early and and do it though at the
- 35:04same time it's just great to chat with
- 35:07Vincent and have an excuse to do that
- 35:10because I'm always learning. I hope you
- 35:12agree
- 35:13um well that I'm learning and I hope
- 35:15that you picked up something yourself.
- 35:18Cool beans, have a great day. Have a
- 35:21great week.
- 35:23Get in touch.