I think a certification process makes sense when the potential consequences of incompetence are severe. Incompetent doctors or engineers (at least some, depending on their scope of work) can get people killed Software development/engineering/etc does not typically have those kind of consequences, does it?
I work in industrial automation, so it absolutely can from safety perspectives at times.
I think a certification process makes sense when the potential consequences of incompetence are severe. Incompetent doctors or engineers (at least some, depending on their scope of work) can get people killed Software development/engineering/etc does not typically have those kind of consequences, does it?
I work in industrial automation, so it absolutely can from safety perspectives at times.
I used too as well, and when things go wrong the can really GO WRONG.
For example, one of our programmers forgot a safety interlock on a centrifuge, so that in one scenario when it was being bypassed, material kept feeding it instead with no outlet. So material just built up and up and until 5 tons of rotating steel at a few hundred RPMs jammed quite suddenly. Not a good day.
Soggybiscuit on
Steam - Synthetic Violence | XBOX Live - Cannonfuse | PSN - CastleBravo | Twitch - SoggybiscuitPA
A compounding issue is that unlike concrete, or construction, where materials science, structural integrity, and testing methodologies are rigorous, established, and based entirely in empirical fact, the software equivalent is... Less so. In rather the manner that bricks float less well than a duck.
Not only is making the thing subject to fits of "Well, Sue found this great blog post about wood...", but the people inspecting the concrete all have a different definition of "structural integrity", in some cases involving "well it's cool, we can just pour more!"
The thing is - we know how to make good software, but it's hard and expensive, so no one does it. This is what good looks like: https://www.fastcompany.com/28121/they-write-right-stuff
It would likely double the software staff needed.
A compounding issue is that unlike concrete, or construction, where materials science, structural integrity, and testing methodologies are rigorous, established, and based entirely in empirical fact, the software equivalent is... Less so. In rather the manner that bricks float less well than a duck.
Not only is making the thing subject to fits of "Well, Sue found this great blog post about wood...", but the people inspecting the concrete all have a different definition of "structural integrity", in some cases involving "well it's cool, we can just pour more!"
The thing is - we know how to make good software, but it's hard and expensive, so no one does it. This is what good looks like: https://www.fastcompany.com/28121/they-write-right-stuff
It would likely double the software staff needed.
More than double and vastly inflate timelines. They have one product, practically unlimited budget and are able to specify in excruciating detail what it does years in advance and can develop a page of specs for each few lines of code. They don't have to run on arbitrary hardware and they probably got to pick the specs of the hardware too
The TCP spec is 80 pages long and would document a moderately sized function with their process
There's no reason a JS function wouldn't work on an ASP dropdown, right?
I am trying to fumble my way through making a dropdown box on a page disable/enable based on the selection(s) in a previous dropdown. I thought I had it figured out based on some researching via google, but no dice. I'm probably simply calling something wrong or using the wrong command due to my lack of experience.
Nothing BROKE at least, just nothing...happened.
I have ASP drop down ddSurvType and ddComplaints.
I want ddComplaints to only be enable if someone selects 1 of 3 specific options in ddSurvType.
I made this JS function (I don't started with one ddSurvType value until I get it working) function toggleComplaint() {
if (document.getElementById('ddSurvType').value = '14')
document.getElementById('ddComplaint').disabled = false;
else
document.getElementById('ddComplaint').disable = true;
}
And then in the inline for ddSurvType I put in: OnChange="toggleComplaint()"
Anything obvious I'm overlooking or I'm just going completely down the wrong path?
A compounding issue is that unlike concrete, or construction, where materials science, structural integrity, and testing methodologies are rigorous, established, and based entirely in empirical fact, the software equivalent is... Less so. In rather the manner that bricks float less well than a duck.
Not only is making the thing subject to fits of "Well, Sue found this great blog post about wood...", but the people inspecting the concrete all have a different definition of "structural integrity", in some cases involving "well it's cool, we can just pour more!"
The thing is - we know how to make good software, but it's hard and expensive, so no one does it. This is what good looks like: https://www.fastcompany.com/28121/they-write-right-stuff
It would likely double the software staff needed.
I kind of want to know what that article would look like for SpaceX now.
( < . . .
0
Options
thatassemblyguyJanitor of Technical Debt.Registered Userregular
A compounding issue is that unlike concrete, or construction, where materials science, structural integrity, and testing methodologies are rigorous, established, and based entirely in empirical fact, the software equivalent is... Less so. In rather the manner that bricks float less well than a duck.
Not only is making the thing subject to fits of "Well, Sue found this great blog post about wood...", but the people inspecting the concrete all have a different definition of "structural integrity", in some cases involving "well it's cool, we can just pour more!"
The thing is - we know how to make good software, but it's hard and expensive, so no one does it. This is what good looks like: https://www.fastcompany.com/28121/they-write-right-stuff
It would likely double the software staff needed.
I kind of want to know what that article would look like for SpaceX now.
Something something mandatory nights and weekends.
With 4 identical control applications being given the same inputs I wonder how often they disagree. I'd always heard that the control programs were written by different teams without any code shared between them but to the same exacting spec.
I did get a kick out of the reverent descriptions of git and bugzilla.
0
Options
gavindelThe reason all your softwareis brokenRegistered Userregular
Oh dear. I appear to have summoned the demon of Multi-thread Cache Management. Someone call the exorcist.
A compounding issue is that unlike concrete, or construction, where materials science, structural integrity, and testing methodologies are rigorous, established, and based entirely in empirical fact, the software equivalent is... Less so. In rather the manner that bricks float less well than a duck.
Not only is making the thing subject to fits of "Well, Sue found this great blog post about wood...", but the people inspecting the concrete all have a different definition of "structural integrity", in some cases involving "well it's cool, we can just pour more!"
The thing is - we know how to make good software, but it's hard and expensive, so no one does it. This is what good looks like: https://www.fastcompany.com/28121/they-write-right-stuff
It would likely double the software staff needed.
I kind of want to know what that article would look like for SpaceX now.
I'm sure you pros run into this all the time, but this is a first for me. I was tearing my hair out with that issue I posted a few days ago but got it working nicely and was SO pleased about it.
Today the user emailed me to ask me to change it, even though I'd had her confirm exactly how she wanted it to work before hand. Argh!
I should point out I am not at ALL a programmer, I only do SQL...this site just got dropped in my lap because no one else in my department does ANY tech stuff =p. So it's a huge time commitment away from my regular responsibilities to mess with this, even though I like learning it.
All they wanted to change was to turn a single-select drop down into a multi-select listbox. Which I managed to get working a lot faster than I expected. I only ran into one MINOR setback and it's all that is keeping me from finishing (I think/hope).
The listbox pulls the possible selection options from a tblComplaint_Master.
When I had it as the dropdown, it default to value 0 which was for None/NA (complaint_id 0, complaint_desc "None/NA"). But now with the listbox, it defaults to no value selected when I load the page initially. If they save the record with no value and then try to reopen it, it gives them an error that the "selectedvalue is invalid because it doesn't exist". Which makes sense since there is no NULL or blank value in the master definitions table.
My question is what is a good way to get around this? I was trying to find a way to make it simply default to the None/NA selection, or to automatically insert 0 for the value into the record table if they didn't select anything but
1) I've not managed to get either working.
2) I'm not sure if this is a bad way to go about it. I'd like to do it the best way possible just so I can learn good habits.
EDIT - I also have this little section and I thought I could do a "else if it's blank/isnothing, set it to 0" but I haven't managed to write the code correctly so far.
If Not IsDBNull(survinfo.Rows(0)("complaint_id")) Then
'Loop through ddComplaint2 listbox and select every item that is saved in the database.
Dim selectedItems As String() = Split(survinfo.Rows(0)("complaint_id"), ",")
For Each item In ddComplaint2.Items
If selectedItems.Contains(item.Value) Then
item.Selected = True
End If
Next
End If
admanbunionize your workplaceSeattle, WARegistered Userregular
You're already in territory that would be considered... alternative design as normally when you have a one-to-many relationship like that the correct value for no items is an empty list, but I'm assuming these data models are (at least effectively) immutable, so we're in workaround territory.
And with that said I think automatically inserting 0 if no values are selected is the correct behavior. You don't want to shown "None" in a multi-select because it'll confuse users when they have None + options selected. "None" in this case is purely a back-end concept, so it should be handled on the backend.
That block of code looks like the code that sets up the listbox on load rather than the block for saving the results... right?
er yea you are correct, I mis-typed what I meant. But yes, absolutely for setting up the listbox on load.
I'm sure there is a lot I'm doing that is not ideal, which is why I bug you folks so much. I don't want to develop bad habits when I can avoid it, but when you're just frantically trying to get something to work and have no real foundation, it's so easy to do, as I'm sure you know. And let me tell you, as little as I know, I can tell you the original design for this site has ALL KINDS of bad problems.
Good point about the "None" business, I hadn't even thought about it confusing the users.
In good news, it turns out "None" needs to be an actual valid selection, so they need to select SOMETHING from the listbox. That probably makes me life easier as I imagine there is a way to set a default value. The only trick would likely be if someone decided to CTRL unselect everything, but in all honest 99% of my users don't even know how to CTRL click to add to a selection. I still want to account for it though, of course.
Yeah data model wise you should be looking at this as "an empty list" conceptually as much as you can, it saves you the most grief.
An empty list is not null in programming land. Null would mean "no list at all" not "an empty one" and the concept of a None/nil/0 list is inappropriate for the model and view both.
I am new enough that I can only BARELY grasp what you mean by that . But I have made a note to read up!
EDIT - I was actually recently doing a tutorial in Python about lists and dictionaries and such, but there is a big disconnect for me right now with what I did there vs what I am fumbling around with in this VB.net code.
I did learn the hard way that trying to evaluate to NULL doesn't work though! Which makes sense but it really threw me for a loop at first.
I am new enough that I can only BARELY grasp what you mean by that . But I have made a note to read up!
EDIT - I was actually recently doing a tutorial in Python about lists and dictionaries and such, but there is a big disconnect for me right now with what I did there vs what I am fumbling around with in this VB.net code.
I did learn the hard way that trying to evaluate to NULL doesn't work though! Which makes sense but it really threw me for a loop at first.
Think about it like a bucket. None/Null/nil/0 mean there is no bucket. Empty means the bucket exists, but there's nothing in the bucket.
Also don't feel bad or discouraged by this, some of us have to deal with coworkers and explain this distinction over and over again in real-world jobs blererrrrrrrgh.
"What? Why the fuck is it returning NULL for no items? WHY DO YOU DO THIS TO ME??"
In general, when you're working with your data, "sometimes a list sometimes not" is a code smell that you probably have something wrong with your design. It's just like "this is sometimes a string sometimes an integer" with similar implications, it's not necessarily wrong but if you don't have a good reason for it you best fix that shit.
Though this is why almost every time I check for empty, I check for null first, because what will it return? Who knows!
Doing both takes me almost no extra time and saves my grief from having to fix it later too.
That's the "be strict in what you output and lenient in what you input" principle which is good defensive practice.
If you're the one making the output, stop shitting it up with null!
If you're the one parsing the output, well, better check cause shitters be shitting rite?
+4
Options
thatassemblyguyJanitor of Technical Debt.Registered Userregular
I like the truthy/falsey kinds of evaluations in some languages. It's been a while since I've fired up my androidstudio, but Kotlin was adopting some syntax sugar to enforce things like, null, null+empty, etc.
I got into the habit of doing that when I started SQL. The db I took over at first was a bit of a mess. A lot of values that had blanks or that should have been trimmed and weren't, etc. So I got into the habit of pretty much always doing WHERE field IS NOT NULL and field <> '' etc etc.
Good times.
Heck, just the other day I fell for it in SQL even though I know better. I was trying to find any results where a field wasn't Y so I did WHERE field <> 'Y' and only got one result, which I knew was wrong, but for a bit it stumped me until I realized, oh right, the other values aren't 'N' but they are NULL instead.
Though this is why almost every time I check for empty, I check for null first, because what will it return? Who knows!
Doing both takes me almost no extra time and saves my grief from having to fix it later too.
That's the "be strict in what you output and lenient in what you input" principle which is good defensive practice.
If you're the one making the output, stop shitting it up with null!
If you're the one parsing the output, well, better check cause shitters be shitting rite?
This is a good heuristic but less useful in some embedded stuff - NULL as a return value tends to be efficient for things like, "When I asked for that CPU resource, did I get it? NULL is no, pointer to somewhere in the memory map is yes."
Though this is why almost every time I check for empty, I check for null first, because what will it return? Who knows!
Doing both takes me almost no extra time and saves my grief from having to fix it later too.
That's the "be strict in what you output and lenient in what you input" principle which is good defensive practice.
If you're the one making the output, stop shitting it up with null!
If you're the one parsing the output, well, better check cause shitters be shitting rite?
This is a good heuristic but less useful in some embedded stuff - NULL as a return value tends to be efficient for things like, "When I asked for that CPU resource, did I get it? NULL is no, pointer to somewhere in the memory map is yes."
Just talking about empty vs existing, and using null for empty still.
Null absolutely has a place and I hate it when I don't have a proper null type.
Ugh. I got this working the WRONG way. And I'm not proud of it. But I think I've been looking at it too long. I'm going to call it a day and come back to it Monday and hopefully make a breakthrough.
It's named poorly. Reference types can be null in C# already, the new stuff is optional checks to ensure not null.
Exactly this. Means that things you want nullable can actually be nullable, while removing the accidental ones which cause approximately 1 million exceptions to be thrown per second around the world.
Posts
I work in industrial automation, so it absolutely can from safety perspectives at times.
I used too as well, and when things go wrong the can really GO WRONG.
For example, one of our programmers forgot a safety interlock on a centrifuge, so that in one scenario when it was being bypassed, material kept feeding it instead with no outlet. So material just built up and up and until 5 tons of rotating steel at a few hundred RPMs jammed quite suddenly. Not a good day.
The thing is - we know how to make good software, but it's hard and expensive, so no one does it. This is what good looks like: https://www.fastcompany.com/28121/they-write-right-stuff
It would likely double the software staff needed.
More than double and vastly inflate timelines. They have one product, practically unlimited budget and are able to specify in excruciating detail what it does years in advance and can develop a page of specs for each few lines of code. They don't have to run on arbitrary hardware and they probably got to pick the specs of the hardware too
The TCP spec is 80 pages long and would document a moderately sized function with their process
I am trying to fumble my way through making a dropdown box on a page disable/enable based on the selection(s) in a previous dropdown. I thought I had it figured out based on some researching via google, but no dice. I'm probably simply calling something wrong or using the wrong command due to my lack of experience.
Nothing BROKE at least, just nothing...happened.
I have ASP drop down ddSurvType and ddComplaints.
I want ddComplaints to only be enable if someone selects 1 of 3 specific options in ddSurvType.
I made this JS function (I don't started with one ddSurvType value until I get it working)
function toggleComplaint() {
if (document.getElementById('ddSurvType').value = '14')
document.getElementById('ddComplaint').disabled = false;
else
document.getElementById('ddComplaint').disable = true;
}
And then in the inline for ddSurvType I put in: OnChange="toggleComplaint()"
Anything obvious I'm overlooking or I'm just going completely down the wrong path?
Thanks!
I think I need to take a break .
I kind of want to know what that article would look like for SpaceX now.
Something something mandatory nights and weekends.
I did get a kick out of the reverent descriptions of git and bugzilla.
Some good insights here: https://www.reddit.com/r/spacex/comments/gxb7j1/we_are_the_spacex_software_team_ask_us_anything/
Today the user emailed me to ask me to change it, even though I'd had her confirm exactly how she wanted it to work before hand. Argh!
I should point out I am not at ALL a programmer, I only do SQL...this site just got dropped in my lap because no one else in my department does ANY tech stuff =p. So it's a huge time commitment away from my regular responsibilities to mess with this, even though I like learning it.
All they wanted to change was to turn a single-select drop down into a multi-select listbox. Which I managed to get working a lot faster than I expected. I only ran into one MINOR setback and it's all that is keeping me from finishing (I think/hope).
The listbox pulls the possible selection options from a tblComplaint_Master.
When I had it as the dropdown, it default to value 0 which was for None/NA (complaint_id 0, complaint_desc "None/NA"). But now with the listbox, it defaults to no value selected when I load the page initially. If they save the record with no value and then try to reopen it, it gives them an error that the "selectedvalue is invalid because it doesn't exist". Which makes sense since there is no NULL or blank value in the master definitions table.
My question is what is a good way to get around this? I was trying to find a way to make it simply default to the None/NA selection, or to automatically insert 0 for the value into the record table if they didn't select anything but
1) I've not managed to get either working.
2) I'm not sure if this is a bad way to go about it. I'd like to do it the best way possible just so I can learn good habits.
EDIT - I also have this little section and I thought I could do a "else if it's blank/isnothing, set it to 0" but I haven't managed to write the code correctly so far.
Thoughts?
And with that said I think automatically inserting 0 if no values are selected is the correct behavior. You don't want to shown "None" in a multi-select because it'll confuse users when they have None + options selected. "None" in this case is purely a back-end concept, so it should be handled on the backend.
That block of code looks like the code that sets up the listbox on load rather than the block for saving the results... right?
I'm sure there is a lot I'm doing that is not ideal, which is why I bug you folks so much. I don't want to develop bad habits when I can avoid it, but when you're just frantically trying to get something to work and have no real foundation, it's so easy to do, as I'm sure you know. And let me tell you, as little as I know, I can tell you the original design for this site has ALL KINDS of bad problems.
Good point about the "None" business, I hadn't even thought about it confusing the users.
I think it's more accurate to call it "least bad"
In good news, it turns out "None" needs to be an actual valid selection, so they need to select SOMETHING from the listbox. That probably makes me life easier as I imagine there is a way to set a default value. The only trick would likely be if someone decided to CTRL unselect everything, but in all honest 99% of my users don't even know how to CTRL click to add to a selection. I still want to account for it though, of course.
An empty list is not null in programming land. Null would mean "no list at all" not "an empty one" and the concept of a None/nil/0 list is inappropriate for the model and view both.
EDIT - I was actually recently doing a tutorial in Python about lists and dictionaries and such, but there is a big disconnect for me right now with what I did there vs what I am fumbling around with in this VB.net code.
I did learn the hard way that trying to evaluate to NULL doesn't work though! Which makes sense but it really threw me for a loop at first.
Least bad? Those were the days.
Think about it like a bucket. None/Null/nil/0 mean there is no bucket. Empty means the bucket exists, but there's nothing in the bucket.
"What? Why the fuck is it returning NULL for no items? WHY DO YOU DO THIS TO ME??"
In general, when you're working with your data, "sometimes a list sometimes not" is a code smell that you probably have something wrong with your design. It's just like "this is sometimes a string sometimes an integer" with similar implications, it's not necessarily wrong but if you don't have a good reason for it you best fix that shit.
Doing both takes me almost no extra time and saves my grief from having to fix it later too.
That's the "be strict in what you output and lenient in what you input" principle which is good defensive practice.
If you're the one making the output, stop shitting it up with null!
If you're the one parsing the output, well, better check cause shitters be shitting rite?
Good times.
Heck, just the other day I fell for it in SQL even though I know better. I was trying to find any results where a field wasn't Y so I did WHERE field <> 'Y' and only got one result, which I knew was wrong, but for a bit it stumped me until I realized, oh right, the other values aren't 'N' but they are NULL instead.
This is a good heuristic but less useful in some embedded stuff - NULL as a return value tends to be efficient for things like, "When I asked for that CPU resource, did I get it? NULL is no, pointer to somewhere in the memory map is yes."
Just talking about empty vs existing, and using null for empty still.
Null absolutely has a place and I hate it when I don't have a proper null type.
If I'm making my own, that shit's gonna be waterproof.
But wherever possible I try to make it impossible to either accept or return null because those checks are stupid boilerplate.
http://steamcommunity.com/id/pablocampy
Exactly this. Means that things you want nullable can actually be nullable, while removing the accidental ones which cause approximately 1 million exceptions to be thrown per second around the world.
Edit: It is a spectacularly bad name though, yes.
http://steamcommunity.com/id/pablocampy