|
Welcome to QA - you must be new here.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I can't answer on there without violating CP profanity policy
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
I have a better one, the assignment includes the following:
Quote: check if the key schoolHours is true, and if it is, set the key playtime to true
So I suggested he needs an if clause:
Quote: Thanks for your answer. Please what goes inside the if () {
|
|
|
|
|
That one's pretty simple...
if ((!(schoolHours == false) == false) ? false : (schoolHours == 1))
|
|
|
|
|
Back in my Fortran days, I found this. (I don't remember the variable names.)
IF FLAG1 .EQ. .TRUE. THEN
FLAG1 = .FALSE.
FLAG2 = .TRUE.
ELSE
FLAG2 = .FALSE.
END IF
I replaced it with two lines that I thought were obvious:
FLAG2 = FLAG1
FLAG1 = .FALSE.
I made plenty of other changes, and the manager in charge of the codebase thanked me for "cleaning it up." (This happened almost forty years ago when 10 MHz processors had only been around a few years.)
|
|
|
|
|
Witnessing such laziness/cluelessness costs brain cells. I'm sorry for your loss.
|
|
|
|
|
Remember, the world's population is going up, while the average IQ is a constant.
|
|
|
|
|
dandy72 wrote: the world's population is going up, while the average IQ is a constant.
It's actually the total IQ that is constant; the average is therefore going down!
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
See? I'm living proof.
|
|
|
|
|
Is ChatGPT learning to ask questions as well as answer?
If so it is imitating humans pretty good.
Give me coffee to change the things I can and wine for those I can not!
PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com
Latest Article: Simon Says, A Child's Game
|
|
|
|
|
OriginalGriff wrote: I can't decide if he's unbelievably lazy, too dumb to walk and chew gum at the same time, or a troll ...
Embrace the power of "AND".
As in "I need a mug of , a glass of 🍷, and a shot of 🥃; to deal with that level of stupidity."
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
|
|
|
|
|
I chalk this up to those moments when something is so obvious but I can't see it. I remember one time having to bang my head against a wall. Gave up and asked team for advice. setup in conference room to review where I was having issues. as soon as I looked at it in the conference room. I could then "see" the issue and fixed it in moments. I think these users are sometimes having that sort of well brain fart moment.
To err is human to really elephant it up you need a computer
|
|
|
|
|
At my level of experience I always expect that now. I will ask a colleague to look at the code with me knowing that as I explain the problem to them and show them the code that I will figure out the solution myself.
|
|
|
|
|
THis is, of course, the real benefit of pair programming. My (admittedly limited) experience of how pair programming works in large orgs is that it is competition, not collaboration. Which makes it less than helpful.
|
|
|
|
|
I made up a type of pair programming, where we share the screen over zoom, and I only watch / help whenever they have a question.
Does the same thing, but I can get work done in the downtime, and we don't have to schedule stuff.
|
|
|
|
|
That sounds very sensible.
I went to an job interview once at a big gov. - supposedly 'agile' - dev place. I was given a pair programming task to write a test for a function, using tools I was already very familiar with.
As soon as I sat at the keyboard I could see a glaring error in the function I was supposedly testing (an uninitialised variable in a language that enforces initialisation), so not only would the test fail, the code wouldn't even compile. My pair stopped me correcting that error until I had written a test that showed the function failing - which of course couldn't be done because the code wouldn't compile.
I wasn't offered the job, as I wasn't a good fit for their culture...
8)
|
|
|
|
|
Mike Winiberg wrote: at a big gov...as I wasn't a good fit for their culture...
Of course. They really were looking for people that would write code that would not work. Those decade long maintenance contracts aren't needed for stuff that works.
|
|
|
|
|
You don't even need a human. I find explaining things to my cat can have the same effect.
<°}}}>«<
|
|
|
|
|
Also known as Rubber Duck Debugging. One of the most useful programming techniques I've ever learned.
I may not have gone where I intended to go, but I think I have ended up where I needed to be. - Douglas Adams
|
|
|
|
|
Ah, you don't have to trouble co workers. The rubber duck method works - buy a rubber duck and explain to it what you are doing.
OK, maybe in private.
|
|
|
|
|
Soon to be followed by: "How to update record?"
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
And then...
if(a="999")
{
MessageBox.Show("DATA DELETERATED");
MessageBox.Show("ALL YOUR BASE ARE BELONG TO US");
}
So old that I did my first coding in octal via switches on a DEC PDP 8
|
|
|
|
|
OriginalGriff wrote: I can't decide if he's unbelievably lazy, too dumb to walk and chew gum at the same time, or a troll
Someone new to programming is, well, new to programming.
Nothing is obvious when one has never programmed before.
With decades of experience with multiple languages it becomes easier to guess at solutions and also much easier to know how to write a google search string that will produce a correct answer. Or any answer.
|
|
|
|
|
Jschell, well said about "new to programming".
I can remember my early days were a grand exploration of logic.
Got hooked. When I look back at old code its like looking into my mind from the
past and thinking "what was I thinking?". Both good and bad code.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
It's hard to tell from the lack of context, but it appears as if your user is asking for feedback that the operation is over and that they should not repeatedly execute the event (such as push a button) to attempt to make your software work.
Modern software is asynchronous and with the limited context, it seems like a very reasonable request to know when your operation has completed.
I guess back in the day the UI thread would block while you were running your database update code on your UI thread and the fact that the application is now responsive again would tell you that the operation has completed and just didn't do anything.
|
|
|
|