Episode: 4635
Title: What did I do at work today? Part 3 Section 1
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr4635/hpr4635.mp3
Transcribed: 2026-07-31 16:15:38 (official HPR transcript)

---

This is Hacker Public Radio Episode 4635, for 2026-05-08
Today's show is entitled, "What did I do at work today? Part 3 Section 1"
The host is Lee and the duration is 00:54:11
The flag is Explicit, and the license is CC-BY-SA
The summary is "Lee narrates a portion of his working day, this episode is section 1 of 2"
You are listening to a show from the Reserve Queue.
This show was submitted in July 2025 to cover occasions like this
where there are gaps in the schedule.
Hi, I'm late today, I'm going to be in the writing and scripted some of my working day.
Okay, it's 3.30 a.m. afternoon, coming back off for a long lunch and air condition is running
on what the temperature is supposed to be. So, and it's 25, it's not that hot. Still got the air
condition running. What's the sense of saying? Yeah, the sense of circumstances, 25.
Right, here and I see I've got a couple of eye messages. So, I'm trying to apply to my sister.
Right. So, I'm running up Joplin. I'm realize maybe I haven't locked hours from earlier on this week.
So, I'm going to code foldering console in Kupun 2 Linux and I'm cutting my work.log, I have a no,
I late fireweight process that monsters the files and network that I'm accessing and
decides for any quarter an hour, what I might have been doing that quarter an hour. So, apparently
I was doing quite a lot on the first of July, which was Tuesday. I think I would have already
looked where I see if I have or not. So, go to name the company to my log folder in Joplin.
It's 2025. I go to Q3, go to July and we're counting the fifth. So, I'll see if I've looked
what three hours. So, then I, and it's only to look what I did on Wednesday. So,
into 5, 7, 8, 2, that would have been. So, I was in the rented office and
think I was from Tinnock. So, I got in at 930 and I was chatting with the staff there. So,
I started at 10, I had the dev meeting. I'm a supervisor and what time did I finish?
I already finished about 12. So, because I left about coming up to half 12,
but I was doing other things at the end side. I looked to a house for that. It's a dev meeting
to hours and I think it wasn't just a dev meeting. I think I was doing a little bit.
I guess I was just seeing, I have three laptop back today, three laptop to date with SQL
a computer. I guess I could have done that at home. It would have worked when I was trying
to demonstrate it. So, note yourself and I should write it down. Try and always remember to
bring the laptop up to date because then what I'm demonstrating will actually work the next day.
I said to you and I haven't done since in that company. So, now the other company
had been meeting this morning. So, I love that. So, there's the fourth of the hour of
look at that and you should actually see what the meeting was about. Okay, so the API
that develops some time ago and then recently I've been providing swag
documentation for it. There's certain actions that it can do in the database after it's
updated, certain entity and they can be specified in the API definition, which is that
this is the beside behind the scenes definition. So, not the public, not the Swagger Json
which for the open API Json which our customers would see but we have a behind the scenes Json
which were used to map between what's in our database and the API that our customers see when
they're querying the API. I think it was really that I just need to document it and I had
documented it in a text file some time ago. I hadn't documented this particular feature.
I think it was going to upload after I've done this. I was going to upload it to Google Drive.
So, I think I can start by doing is just getting the copy of that hopefully it's in
I don't need to go to the remote server hopefully it's I've just opened up sublime text
and gone to the company folder and then looking this is a project on the left-hand side which shows
all the folders on the left and for each folder I have notes and source, a spell source SRC
and so the source is the actual source code and there's a I use a plugin for sublime called
SFTP which just uploads my source code from the local machine to the development server and
that's that that mapping is mapped in the Json file called SFTP conflict of Json but everything else
that itself is not going to be uploaded but everything else in the source folder would be uploaded
as and when I save it but separate from that for every project other notes folder where
my PDF files are text files like specifications and things so go to the API and go to source
I look in this framework so I haven't actually put it in there I look web framework no
so it should actually be in framework folder so I can download it actually so I right click on it
I don't want to download the whole folder so what I do is create a folder so just create a folder new
new folder called framework and then I go into this empty folder and then I go to SFTP context menu
I am which has been added by this plugin for sublime text and I'm browsing the remote and within
framework I'm looking for non code so that actually I'm not going to download that I'd create a
folder called non code inside framework could non non code and I'm going to non code and then
do the same to browse non code and API and score Json on score documentation.text I click on that
click download and here's my docs my text based docs is in I've done it in Markdown
I've gave it the extension text let's copy that and I guess I make a word document so I'll run
Libra office writer well why am I making it um why why am I losing Libra if it's already marked
and what's used type for is a good markdown editor so I've put the theme into the night
I had switched to a light theme because recently they changed how it worked so that when you
convert to a PDF you should always come out in the light theme which is sensible but now it
actually comes out in a dark theme if you've got the dark theme selected on the PDF which
well some people want one that I don't want that if I'm making a PDF I'd like it to be
black text on the white background because PDF is very different use case from
the markdown files you edit the markdown files you don't edit the PDF and if I'm previewing a PDF
I'm doing it in is it called ocular and I've got that set with expressibility so it's
so it automatically converts the black on the white text to the opposite way around
and actually I had a bit of coloring shading so it's not quite pure black and white right
so it looks nice on the type of the markdown document in type aura so I think I just need to add an
action my action uh thing so and I've documented I'd like documented in the code
so actions in the column definition will create extra relationships and in this particular
system uses a graph a style of database and they thing is they're actually using my SQL but
uh the uh when it was when the system was devised they implemented their own they rolled their
own graph database on top of the relation database that my SQL provides so everything's links
and notes except they call them you know objects and relationships as with a little bit of
an ambiguity because relationship could even mean the type of relationship or it could mean and
actually the link between any two notes right so top level if it's a top level field now it's
not it's a column definition field so actions um yeah okay so I say field actions and I say that
will create extra relationship actually to format this nicer um I'm just gonna make uh the fields
out it takes a bit of extra time makes it easier to read jokin a kind of desertion replace
it would be a lot easier for me to set a finer in place in type aura so replace uh field
with star star field so it's filled colon with star star field colon star star and I mean
asterisk by star and I replace all and that's worked except the one that I didn't the
couple I did manually it ended up putting two lots of two lots of the double asterisk on either side
shall do that for those two and then I wouldn't do the same thing for the word value so
edit find and replace place value value colon it should be uh replace all and again the one that
I've done has ended up putting four lots of asterisk so did that and it's the the nice thing is when
you fill in a line on type aura you can see them up down but when you come off the line it hides
them up down so it is kind of the best of both worlds when it comes to having them up down there
but it not being all in your face so at field actions create extra relationships when you just
it's easier just to provide an example which I which is what I did in the comment in my
source code so I'm just putting it uh uh E.e. I say e.g. under a code block so it's 3 back tactics
I mean you can with mark down you can alternatively do just indent it with a tap and it
all turning to a code block. For whatever reason I find that confusing. I just always
prefer to use the three tap-baptic. So if it's just one little part of a document, you know,
if it's just one word or one sentence, then I'll just use a single-baptic and enclose it in
a single-baptic. So anyway, so in my JSON, I'll say trigger colon update, comma action, colon ad,
and then what does it add? It adds relationship, colon 7024 is just defining a particular relationship,
which is the relationship we use to specify the type of an entity and then the child and we're
doing 2085, which is just a particular type, which we assign when the type of something is
contact. So basically this facility and the API that I've devised will let you specify that an
entity when it's updated by the API will make that entity have the type contact. So basically
obviously you'll use this when you're defining the contact definition. And it's not
extend about this. I don't expect to understand this in terms of any other system. This is just
how we've devised our internal systems to do things and then how we're exposing that to the
customers when they're wanting to query and make updates via our API. I think this is okay now.
And then it's a bit bad. I don't know if it's good practice just to document something within
example. Because I mean, they might think update, like I've said, the trigger is update, they might
think there might be other triggers and the action is added. They might think delete is a trigger.
And I just, maybe I should just say, because I think I can check looking in the code of any
implemented update and I've only implemented the trigger of update and then the only implemented
action of add. So I'm just looking at my code that gets sublime text, get to my source,
get to my function, get to my API query.php, search, and sublime text with the word action.
And for each action, if trigger equals trigger, okay, so there are different triggers. But the
only action I've implemented is add. So it says if action equals add, then it does something.
It doesn't, there's no such thing that it will do if the action equals delete, because I just haven't
implemented that. So it's passing trigger as a function to my function in PHP, which is apply actions.
And how many times am I using that? I'm only ever using the word update. So I try to update
actions. So, okay, so my gosh, you just say currently the only update and add to the
I need currently I put this in a single asterisk, because it makes it italics in markdown. So currently
update is the only trigger and add is the only action. So and when I've sang EG, I might as well
give it say what this example does, sets set the type 2 in quotes contact. So that actually says
what it does, thing I've put up, the word update and the word added in double quotes.
It's their actual. I actually have to spell it out precisely. All right, save that as, well, save
it's marked down. And I'll put it, I'll put it in noncode, exactly where it came from, because I'm
not using sublime text, it's not going to automatically update it. So I'll just close in sublime text,
while I'm saving it. The save has, I'll go to my Dropbox, I'll go to the company,
I'll go to API folder, I'll go to source, get to Framework, Uncode, call it, whatever,
the how it's called API JSON documentation. I'll just copy the path and I'm just pasting the path.
Straight into the save dialog box and I click Save and that's overwritten it. I hope,
I just double check that. Yeah, it's overwritten it. And then I can say it.
Now I've got it opening sublime text, all I have to do is hit Save and it should update that to server.
Yeah, I see success, they did it to server. So that's only so getting the source code repository,
but I just wanted to generate a word document, because I want to put this on the Google Drive.
So export, definition,
documentation, I'll put that, I just, because I'm going to do it manually, I'm just putting it on the
desktop for now, and Ubuntu is nice enough to show me files that run the desktop on the
desktop. You know, you don't take that for granted, just like the Mac and the longer
a blogger's to do that, maybe other systems as well. You know, I thought you used to have
anything called the desktop now, you lucky if you can actually see what's on your desktop on the
desktop, all times. And actually, I've got a little sidebat this, I mean, the trouble was,
in the old days, given like 15 odd years ago, maybe, if we used to show it, well, I certainly just
shoved everything on my desktop folder, but I did that day. You know, because it was just then,
it was all in front of me. I ended up writing an app, put it on the app store, called Desk
today, I'm pretty sure it's no longer good there, because it's, would have been removed,
because it's no longer compatible, anything like the latest version of OSF, what was then called OSF,
which now called MacOS. It's probably even two different generations of
processor behind what it was targeted for now, but that would just create a desktop, I mean,
Iran, what was called an Apple script, which was an automation script on the MacOSX had,
and it would create a folder for you on your desktop. No, it would create a folder in a certain
location with today's day, and it would just copy everything on your desktop into that folder,
so nicely neatly tuck it away. And then you do easily be able to navigate to that place and find
what you're working on in a certain day. I think some people found it useful, I mean,
as with any automation, there's hundreds of ways of doing things, and other people,
and I have completely different workflows, it just sort of fitted my workflow at that time.
Even today I would say that's nothing like one, my workflow is, and I'm sorry,
workflows a bit of a, bit of a bougie word. You know, when you start talking about your
workflow, I mean, is it does that really mean anything? It's just habits that you have using
your computer, even bougies of bougie word. I don't know, I need learn to recently.
So, right, plus, train of, train of thought officially lost the squirrels in, I mean, I don't
think I have ADHD, but I certainly do get the squirrels come and attack me from now on me.
So, now and then, so, um, and to go under the squirrel, the, I think the metaphor of squirrels is squirrels,
it's always collecting nuts and then burying them somewhere and then forgetting where they're
burying them. That's where that metaphor comes from. I always try to what's called squirrel
back to where I was, and so, if I'm working, that's absolutely necessary. If it's necessary,
if you have a conversation with someone too, it's you want to get totally lost.
So, the export definition, I've got it on my desktop. So, just, if you can get Google driver,
and then shove it in Google Drive, drive.google.com, and I go to the company,
the user that's associated with this company, and it's in my name as well. It's asking from
my passwords, which Firefox is building, then last pass and saying, oh, you've entered the
password, do you remember it, and you just know, thank you. Now, go to, to share drives,
no, shared with me, a good shared, then that share is nothing. I'll tell you what is
shown me, for whatever reason it's shown me the last month. So, maybe I need to go to
my drive, go to development, and write ship diagrams, testing templates, form builder.
So, have they got one for API? So, I'll just create a folder for API. I'll ask about this folder,
create an FAQ, explore these files, and I just want to create a folder, and I just go to new
folder, upload, I don't know, upload a folder, new, new folder, call it API, and just go
to API, may or should be able to drag this file here, and it, yeah, has appeared there,
I'll just open it in Google Docs, see what it looks like. So, there's export definition,
and it's got all the stuff put in there. I'm going to search page break here between one section
and the next. It's got horizontal line, I'm going to search page break, and just Google Docs,
even, I'm pretty sure it allows you to search new page break and page break before, yeah.
I guess this, this is better being there than not being there. It's not another best documentation
in the world, but at least it's there, and I can share a link with my supervisor. So,
file, share share with others. Here, it always already have access, but if I just give
a definition, sorry, it'll give a notification to him. So, so, pick him from the left list and note
file, and click send, and hopefully it's just specifically note to find him. I don't know if
it'll appear in my outgoing emails that I know to find some of something, just go to Gmail,
and go to Sint. No, it hasn't really done that. I'll just have to trust it. I just have to
trust Google that is done the right thing, or perhaps I'll send it in fact send an email.
Even look at a tattoo. All right, stop recording for a second. I've just got to apply to
an email about something else. Okay, I just didn't need to apply so email. So, I remember to
make sure I'm the overzealous about logging time loss that has been doing other things.
I had a sip of coffee, it's slightly starting to go cold. I should not surprise him,
given I've got the air conditioning on it here. Yeah, the only reason I checked my email was I'm going
to email my sip twice and just let him know. I'll send him a copy. So, I've got Gmail
attaching something, gets the name of the company, I go to, you know what, I didn't put it there,
put it on the desktop and then I deleted it. So, I just go to a black dolphin, get to the waist
in, go to modified and it should be at the top, drag it back on the desktop and attach it there.
So, so hi and attach this, the API.export.exe, it's our side of the API, not the customer face inside,
attached to the API.exe, I've also added this in the development folder of the people tried
the cards. Lee. As schedule send that, time is it's work, so still it's work hours, so I send it
in a couple of minutes. I'll send it immediately just in case suddenly something jumps out made
you made a mistake and this I can just click on the document and just preview it that is actually
the one that I meant to send. And, you know, unfortunately in this one, it's not the version that I put
in the page breaks, it doesn't matter, I mean, it's, you know, it's where there's canonical version,
it's in the Google Drive right now, out the way, it's a opening job, and again,
I do sometimes go through the to do state, you know, a phase in which I'm rampantly ticking
stuff off of the to do lists, but if life is fairly uncomplicated, then I realise that at
times I don't need it to do list, I can just look at what I need to do, and do what I need to do
without having to take it off. I mean, I just get, I end up getting obsessed with ticking things off
much to do list and I end up putting loads of junk on the to do list that I actually really need to
so itself is self-defeating, you know, at the same time when life becomes unmanageable, then I really
do need one. So what was I also saying, maybe, I mean, I was saying I should create a brand new one
that I really need to, maybe at least get feedback on the one I've given, and then I flush it out
some more. All right, if I think, if I think, oh, actually, I'm not happy with it, I really want
to invalidate and I'll go back and edit it, but at least it's in the right place now that I
can edit it, and it will be shared with the rest of the team in quotes. Right, maybe test resetting
types from your group. So should I actually test it to see it actually works? I mean, it should
be in my original test, is it in my original set of tests? Have I got a set of tests? So I've
got to see that, for every reason, they go in the demon directory, there's a fold of good tests,
and there's a fold of good rest API, and I've got run tests, stop PHP. So this is using a test
class, I wrote myself. I mean, since I'm using PHP unit, for any new tests, I write, but at this
point, I just written the test framework myself. I ask, you know, from scratch, and it's not, it's
another most complicated thing in the world, it's like it's got a certain pass file info section
pause result. It doesn't do any kind of cover, it doesn't test cover, I'll exit on file,
as a flag. It doesn't do any kind of coverage, but it'll each do nice sort of helper functions,
so not repeatedly, applying formatting to the test stitch, nicely formats, when I search something,
it will nicely crash if the test fails, and so on. You know, I can just assert some abouli and
condition, and it will handle the rest for me, and print out all the headings and pause the script
to allow you to read it. When it's running, because these particular scripts, I kind of write
that's only on the time I was writing these, so I write these not just to pass a file,
or so that you can see what's going on as they're running, so for that's kind of help for
especially while you're developing it, you don't just want to see pass a file. Maybe, you know,
if it's part of a big code base, and that's not what I mean, if it's part of something where there
are a lot of people working on it, then yes, you just want to see it pass a file if it's constantly
being updated, yes, you want to see it just pass a file, but if it's mainly being used as a
developmental for what you might call test driven development, whether you're really doing that
to that's really to let her, then for that, I'm more interested in getting useful debugging
in file out of it, so I've searched for the word action, so I'm not getting action,
I'm a position of said that in exactly that way, action, I'm not getting action,
or my action is a large number of thousands of miles away, action, action,
so I'm going to this one, I've got any action, so I've got any action, this one I've got any action,
so I should write a test, there you go, fakes, I'm going to write a test that tests if I'm
getting any action, so I'll create a new export definition, I'll call it xccakes, I'm using the
thing called cake cakes as my dummy entity, because I'm pretty sure that this is not going to
clash with, she was my supervisor's suggestion, I think, but it's not going to clash with any real
entity in the system, if I'm adding a cake or delete in a cake and I'll ask the delete or add some
vital data, because you know, though do this, if you're running a cake shop, but if you're running
a software platform for facilities management compliance, you're probably not going to have an entity
called cakes, right, so I'll just copy an existing one and I'll go to the folder and I'll say new
file, paste that in, I've got a choose a relationship, so that's the cake relationship, that's
I just want to set the type to some cake type, I'd define one and to look at my list of objects
of things that I've defined in the database, search for the word cake, dummy, if I could
and dummy cake, it's just to be doubly sure that the sublime text is being a bit strict about
a case, it's up for a lower case, dummy cake or for a unit to ingredient, right, I'm going to have
to define a new type, see, and I've only just started using a synchronization system, which let's
mean user front, you know, user front end, for defining types of and having to do it manually,
I guess what I'll do, I just do this one manually, sorry, it allows to find relationships,
it doesn't allow you to find objects or it will allow you to find an object, but it won't be
in a specified range show, I'm just going to define this object, so I'll call this section of my
object definition to you, it's just a list I'm manually keeping myself new API tests,
and it's a bit dodgy calling something new because at some point it is such being you, I'm calling
everything new to like new zero and quick book stuff, and obviously it's not new anymore,
so I'll clean the word new, you know, something else is not new anymore, but this one that I
am calling you, and I just incremented the object number so it's got, so I'm giving it a unique ID
for this constant, it's basically an I call it an object underscore, dummy, dummy cake type,
and I'll just give it a title which is dummy cake type, and I guess I should actually insert
that into my database should I do that in the tests, so go to my run tests,
add new, I'm jumping around here, but there were either methods to my severe and enduring
matter of health problems, so go to add a comment, so for the, I put at the top of the test,
so add a type using actions, and I just, so then I'll repeat in that because I'm
creating a new test section, so I'm just calling the test section method, that was my comment
that is my method, which will come out as a title when it's running the tests, add a new type
to add to add the cake type, and actually I want to be more generic, so add a new add a
type to an object using actions, and I don't want to add it on a link, so I say link a type,
so the rest of it, I'm going to have an assert at the bottom, some keeping the assert,
I just say assert true for now, and I'll say type was added, so it will pass, that test will now pass,
because it's I'm just asserting true and true always, it's true, I'm not asserting any condition,
so I just, maybe just get a grip on what's going on, make sure the rest of the tests pass, for
example, because it could be all sorts of misconfigurations since I last ran this, there was
stop them passing, SSH into the server, I don't have to specify username, I don't even have to specify
it for the defined house name, because I've put it in my config file, in my SSH folder, so I just have to
say SSH in the name of the folder, it's going to leave something or other, so I'm in there going to the
demon directory, I don't know if I can just use the letter J, if I just say J tests, yeah,
that worked, because as it's nice that we utility could J, I don't know where it's called J,
or to jump or something, and or to jump, yeah, or to jump a faster way and it's now to get
your file system, so what I realized is often I'm going to lots of folders, I mean I'm
seeding up and down all over the place, often these folders uniquely mind, so we've auto jump
installed, it looks at your history, or it creates a history for itself of what directory is
going, and then just you just check J, and even the name on the folder, or even just the first few
letters and press tab, and it return, and it will jump into what it thinks is the folder,
that it got it wrong there, because I just put J space T, and then hit tab and hit return,
and it looked found the T in that patchy site, it's enabled, but if I say J tests, it's got
directly gone into the demon tests folder, so I'm like going to the rest API tests, and has actually
saved this new export definition that I'm working on, yeah, it's four, it's four, it's four,
it's four, it's five, I think I called that, I'm pretty sure I'm only up to number four,
so it's four, the cakes, and I'm up to number five, so I shouldn't be editing this file,
just undo anything I've edited, did I? I think I just created a new file, I did the wrong thing,
I didn't name it, so I'm back in supply and text by the way, I go in the rest API folder,
new file, I call it, export cakes6.json, and I save that, and actually I just put that as the first line
of the file, and then save it, it automatically calls it that, then delete that, save it again,
there's an empty file, and then grabbing the contents of export cakes for I haven't just placed
it into export cakes6, and save that, and while I'm messing around, I'm going to
my first and double clicking on each of these things in supply and text, because it's annoying
when you switch to a different file, it will sometimes swap out the current window. If you haven't
double clicked on the file to tell it to keep it open, so now it'll keep it open, so when I click on
cake test classes, it opens a new tab, so just add in the cake definition class,
JSON file name six is exports cake6.json, so there's got access to that,
I seem to be doing some set up here, some set up cakes five, so what, what does it mean if it's set,
what's my set up thing doing, set up child agencies? Okay, so it's just set, it's just getting
it's grabbing the definition, and then putting it in a protected variable, protected property of the
class that protected, yeah definition, so all I'm just noting is to be consistent, I'll set up
cakes six, cakes export six dummy in brackets, and I'll give it pass in the file name number six.
This could be the as to many levels of indirection, which makes the code more readable,
or at the same time adds extra steps of what you have to do, you have to
vaguely understand what this test code is doing before I do anything else, so
I'm looking at my test class, looking at my last test dummy cake five, dummy cake four,
dummy cake, is it um, is it a test, so I want to, basically I want to add a
cake to the database, right, so where was I at before, I wanted to add a type, so I want to add the
type, basically in my code, so is there a setup function that this, that when this class has been
initialized, I can just see it's in the construct function, yeah it's in the construct,
so phased, definition, it's got as a remove function actually it runs afterwards, so I can
I can actually delete this type in the remove function that I'm adding here, first I want to define
the type, I define it as a constant, so constant object type, dummy cake, the columns,
and what did I call it, dummy cake type base, got an integer, it's a large integer,
like 5, 0, 0, 1, 0, 0, 0, 4, 0, 0, 1, so I'm just going to paste that constant in my code,
so that after, so it's hard code, the top of my class, I don't then have to refer to that
hard code number again, just refer to it by the name of the constant, which is object type, dummy cake,
so let's add that type, this, the data, I'm actually curious now, can I, how do I add an object,
I just create, create, and what will happen if it fails, so now I'm actually looking to
a library and this is a library that I write myself like a lot of years ago,
for doing database manipulation, so can my create function, if child is an object,
and it returns the object, so it's not actually going to see if the object already exists,
so as you're going to check to see if the object exists first, so cake type equals this data
objects, so object type dummy cake, so there I'm initializing an object and it may not
or may not exist, because if cake type were actually, I'm having an intuition that may be
then that's not right, function, I let it's going to play, it closed the mandate for mix,
I didn't double click on it, so this time I've double clicked on it, right, I've opened my data,
my database access class, so it's, when I call the object function, it's creating a new,
something that in my class I call it a DB object, so now I'll go to that class, DB object,
class if it can structure, yeah all it does is set the ID, so yeah the kit you can very well
create an object, even if it doesn't exist, it's not going to throw an error at that point,
so go back to my test class, where I'm constructing my test class, if cake type exists,
now say if not, take, take, die, since then I want to create it, putting curly brackets,
this data create, so self what I actually need to check what the
parameters create, so when I'm looking for a function I always just say Ion space and the name
the function and a search for Ion, I search for the Ion, Ion, Ion, because that will always find the
function, at least in PHP, so it wants to type ID, a user ID and a people ID, so they actually
create it's the wrong thing, because this will just add an object and return a quiet, it won't
add an object with an existing type, I could be in trouble here, I could have no way of adding an object,
that doesn't that where I want to specify the ID, but I think that you can't do that at our
lower level either, what you do of an SQL query, it looks like I'm actually going to amend my data
object class, I never modify an existing method for this, because of the large number of things
that depend on it, but I'm quite happy to add a new method, so I create new and my SQL will be
SQL, in search for what parameter should I have, I should have a name for it, I want to name this
object that I'm creating, so I'm saying create new, so I'm saying create existing, that's actually
more accurate, create existing, I'm like create with ID, create with ID, yes, this is my data
source class, I'm just wondering if my data object class lets you create one, my doesn't, I can
just say into any number of white spaces, take of a capitalization object, so I've got into
document, I'm saying document in saying it, I have no point in my uncertainty object table,
so I know it, and I was a fact now that that's not going to happen, that's going to happen
with white system code, so I do need to create this new function, so create with ID, ID and name,
so yes, go up is in search, I'm putting the SQL in capitals, the SQL key words and capitals,
and any actual column names are put in little letters, so insert into or table names,
insert into object, someone might change, I mean it's unlikely, but someone might change the definition
of object, so I just actually specify the fields that I want to update in that, so I'm going
into the term now, I've got a function, I've got a function called my, which just runs my SQL
and runs a query against my database, so this object, my in quotes, this object, and it's telling
me the definition of object, so in terms of object, so I'm putting in brackets, the names of the
columns object, I'd be explaining text, born, modified, and write, and then values and
putting the capitals, and then I do need to put the values in brackets, so I don't know basically
guess you are, I don't know the simple thing about SQL anymore, just search, so I've, what I've
done is I've got zero, zero looks of dog books, the dog set, yeah dog books, is that the right
word, dog docksets, and even now I have to look that in Google, so I run a dog set, yes, a dog set
is a structured collection of related documents, he's for organizing a viewing documentation,
so I've run zel to look at the dog set from my SQL, and search into, oh, and search,
so now I'm, I've looking at the wrong thing, I'm going to, so it enables a thing to be inserted,
I'll just say it inside into, into, into, it's just the next size and feasibility, but I already know
what the answer is, but I just now determined that I want to see it in black and white,
even, it would be plausible that you could just leave out the brackets, I mean, I've been doing
SQL for 30 years, I don't know, I assume anything, I don't assume that my brain tells me the right
things, it's basically what it is, so I can't, there you go, I've got a dog set from my SQL, but I can't
seem to find the insert syntax, so it's actually too simple, maybe I need the SQL dog set,
well that was it, that was an interesting thing, so I'll just go to, I'll run a llama,
I'll ask a llama, what is that syntax for SQL insert? Does it need brackets?
Yeah, it shows it in brackets, in no important, you must include parenthesis around the column list
of your specified, which comes to its value values, provide to cross-family values for each column,
listed, and close these values in parenthesis as well, there you go, there's absolutely certain
you have to do in closing parenthesis, anyway, so insert, I'll go back to what I was doing in certain
to object, I've specified the fields, the values will be then the idea, shall I say insert,
ignore, shouldn't say insert, ignore, because do I really care if this file is done when a trick
will it narrow-tapping? Well, yeah, I mean, I can't wait, kill the system, so I'll let an therapy
log-diff it is, and so I'll just insert, I do nine, and you know what, I'm just going to look
on my existing code base for, I'm going to run up a new terminal, SSH into it, going to the functions
directory, I'll just use Brett, Brett, so and I'll look for it into objects, and I can see that
that there is then same born and died, and sometimes they're not in certain modified, modified defaults
to zero, anyway, so I'll take that out, so there's certain born and died, and what should born,
being what should died be, so what I can, though it's just told me, Brett, Brett is, by the way,
is it a faster version of Brett, that just looks recursively free, it's like Brett, high for
now, this is Brett, Brett, which is just specified with RG, and this is another version called
AG, which is the silver surfer, which is another version of this, but this is the one I'm using
Brett, Brett, goes recursively for the files, and you can specify types of as far to look at,
and it looks for text within those files, it's specifically, especially useful for source code,
so I've looked for it into object, I'll just do high for the 10 to just say what was
having before, it did that, because then that would just tell me how we know me initializing the
born and they're died, so I know died would be zero, but what will born be, Brett born,
so I'll pipe that and then Brett born, and that, okay, so it looks like it's just using the time
function of HP, and what is, yeah, I have most of the stuff I know already, but I just, I don't trust
my brain to remember it, so I'll select just as a test, my select born from object limit 10, it's now
ordered descending, maybe, give me sensible ones, ordered by born descending by born ascending,
what have I done wrong, and now I should put the limit afterwards, after the order by, they make
a skill skills not really up scratch, so I can say it's a long number, so it's a unique time stamp,
and that's what I can use, and zero, and I just go to the time function in PHP, and yeah, it's an
into two returns, number of seconds, it's a unique success, a unique timestamp, so I just say back to
my, what I was doing before, in certain type of object value, if I just say born equals or in the
closed time brackets, it's my PHP, and then I'm in my insert statement, as in my SQL,
string, I'm saying a certain type of object, so names of the columns, values, and an ID name,
born, and the diet can be zero, because one modifies them 74, I'm not sure if diet does,
certainly I seem to be seeing that elsewhere in the code there, explicitly saying diet to zero,
and then how do I run this SQL, got some help functions to do that, function could
be run SQL, that we've got to help a function, so I'm saying DB run SQL, and is it this DB,
so DB is that necessarily a property of my data source class, yeah, I'm looking at other functions
that commit and waiting and listening, and there are work, certainly commit, it's looking at this
DB, so yeah, DB is, does exist, so what was I do, what objects is it, add existing, so existing,
okay, now I'm lost, what was I adding, exactly, create, create with ID, that was what I was doing,
create with ID, it's just finding the ID in the name, it runs the SQL, and now that's
function does it return anything, you don't actually let it file silently, the ID already exists,
and it files if it doesn't exist, then it actually has inserted that object, and at least some
log will log that the SQL file to run, which is fine, something I've learned, you don't want
to overspecify error conditions, some life is a level function, you can just expect for it to
even work, so it doesn't, and it's using the same sort of thing as the other functions,
because you could see, you could look at how many rows were affected or whatever.
That's all for today, but this narration will be continued in a subsequent episode.
You have been listening to the Hacker Public Radio podcast, at hackerpublicradio.org.
Today's show was contributed by a HPR listener like yourself.
If you ever thought of recording a podcast, then visit the HPR site to find out how easy it really is.
Hosting for HPR has been kindly provided by anhonesthost.com, the Internet Archive, rsync.net, and the HPR Community Content Delivery Network.
Unless otherwise stated, today's show is released under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.
