Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,297 members, 7,815,522 topics. Date: Thursday, 02 May 2024 at 01:53 PM

The Greatest Programmer On Nairaland - Programming (19) - Nairaland

Nairaland Forum / Science/Technology / Programming / The Greatest Programmer On Nairaland (65223 Views)

The Most Popular Programmer On Nairaland 2016 Edition (verification Round) / Seunthomas - The Greatest Programmer On Nairaland / The most popular programmer on Nairaland 2016 Edition (2) (3) (4)

(1) (2) (3) ... (16) (17) (18) (19) (20) (21) (22) ... (39) (Reply) (Go Down)

Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:27pm On Feb 26, 2016
seunthomas:

Its not about memory, but about someone writing code that would exploit your system because of that code you just wrote. That is why we have hackers exploiting systems because we write bad code na. We are all guilty.....

When dhtml18 said you kept shifting the goal post I thought he was lying but this right here is proof. Initially you said I couldn't write the code. I wrote it and purposely chose C a rarely used language. Now your excuse is that the code is insecure. Where we talking about secure code? Or code that works? Who told u I don't want my system hacked? I want it hacked.

Now yes or no does my code work? Is it functionally correct?
Re: The Greatest Programmer On Nairaland by FincoApps(m): 3:28pm On Feb 26, 2016
guru01:

Write a program that computes the length of a given string with out using the inbuilt string length function of that language.

So disappointed in the simplicity of this question sad. Or are you simply just purposely under estimating your opponent ?
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:29pm On Feb 26, 2016
guru01:


Sorry, you question is not clear enough to me.
But i think B is the correct answer.
Am i correct or not.

You *think*? Or B is your answer? And would you like me to explain the question better?
Re: The Greatest Programmer On Nairaland by Nobody: 3:30pm On Feb 26, 2016
airsaylongcon:


When dhtml18 said you kept shifting the goal post I thought he was lying but this right here is proof. Initially you said I couldn't write the code. I wrote it and purposely chose C a rarely used language. Now your excuse is that the code is insecure. Where we talking about secure code? Or code that works? Who told u I don't want my system hacked? I want it hacked.

Now yes or no does my code work? Is it functionally correct?
You see what I was saying now? He is trying to swallow evidence before a grand jury!
Re: The Greatest Programmer On Nairaland by guru01(m): 3:30pm On Feb 26, 2016
airsaylongcon:


You *think*? Or B is your answer? And would you like me to explain the question better?
So you know how to explain the question better and you are here talking too much?
Please explain the question better if you can.
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:30pm On Feb 26, 2016
FincoApps:


So disappointed in the simplicity of this question sad. Or are you simply just purposely under estimating your opponent ?

He only gets one shot. He has tossed his shot. I get only one shot. I have tossed mine
Re: The Greatest Programmer On Nairaland by guru01(m): 3:34pm On Feb 26, 2016
Is my answer correct or not?
Mr. talkative.
airsaylongcon:

He only gets one shot. He has tossed his shot. I get only one shot. I have tossed mine
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:36pm On Feb 26, 2016
guru01:

So you know how to explain the question better and you are here talking too much?
Please explain the question better if you can.

A procedure "CallBack" is recursive for *some* inputs. If this procedure is guaranteed to terminate, then which of the following is not true.

a) CallBack has a local variable
b) CallBack has an path of execution where it is not recursive (doesn't call itself)
C) CallBack refers to a global variable or has one or more parameters

The name of the procedure (or function if you like) is CALLBACK.

This procedure is recursive if it gets certain values (eg 3 or 7 or 199 etc)
For other values it is not recursive.

Irrespective of whether it gets a value that makes it recursive or not recursive it WILL terminate.

Which of the options in A-C is not true given the above qualities of the procedure
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:37pm On Feb 26, 2016
guru01:
Is my answer correct or not?
Mr. talkative.

Your answer is wrong. And it seems like you are guessing

1 Like

Re: The Greatest Programmer On Nairaland by Nobody: 3:40pm On Feb 26, 2016
airsaylongcon:


Your answer is wrong. And it seems like you are guessing
Simply conceding defeat would have been less-shameful.

1 Like

Re: The Greatest Programmer On Nairaland by CodeHouse: 3:41pm On Feb 26, 2016
Knownpal:


CodeHouse I sight you sir.

How are you mate? I saw your post, has anyone given you the best yet?
Re: The Greatest Programmer On Nairaland by FincoApps(m): 3:43pm On Feb 26, 2016
seunthomas:

Oya make i explain myself na before you crucify me. In programming especially in statically typed languages it is always recommended to declare every type before using it. Although code works fine but you did not define the type of i in your loop. Na wahala be dat ohhhh. It will work ohh but you may get segmentation fault or memory corruption.
What am i saying self. Looking at your code its very wrong........... You wont understand. IT WORKS ohhhh but ITS WRONG.....

You criticize people's codes toooo much, it's becoming annoying. The painful thing is you don't bother to correct the code you criticized. See an example of correcting people's code without making them feel bad or inferior https://www.nairaland.com/2529139/tic-tac-toe-online-game. People make mistakes

Consider that you have written 2 codes or so on this thread and every single one had a mistake or 2 so please correct people's code instead of just bullshiting it
Re: The Greatest Programmer On Nairaland by guru01(m): 3:44pm On Feb 26, 2016
airsaylongcon:

A procedure "CallBack" is recursive for *some* inputs. If this procedure is guaranteed to terminate, then which of the following is not true.
a) CallBack has a local variable
b) CallBack has an path of execution where it is not recursive (doesn't call itself)
C) CallBack refers to a global variable or has one or more parameters
The name of the procedure (or function if you like) is CALLBACK.
This procedure is recursive if it gets certain values (eg 3 or 7 or 199 etc)
For other values it is not recursive.
Irrespective of whether it gets a value that makes it recursive or not recursive it WILL terminate.
Which of the options in A-C is not true given the above qualities of the procedure
B is my choice answer.
Re: The Greatest Programmer On Nairaland by Knownpal(m): 3:48pm On Feb 26, 2016
CodeHouse:


How are you mate? I saw your post, has anyone given you the best yet?

It's only lariaoft o, He just needs to pay me.
Re: The Greatest Programmer On Nairaland by seunthomas: 3:48pm On Feb 26, 2016
dhtml18:
@seunthomas, i put it to you that not declaring the variable will not cause all those rubbish errors you are talking about. Stop trying to confuse people on this thread with your ignorance.
That was how you said earlier that the javaScript that I (a whole dhtml/master of javaScript) wrote with eyes closed, was not supposed to run - that it was a fluke? You ought to be punished severely for that.
Now show me evidence that the code will actually cause memory corruption or whatever jargons you are saying, because i have never seen or heard it - and yes, I have been coding since 1998 (but i may not be a professor like you sha).


Better dont take that joker seriously, he just likes running his mouth recursively.
Of course boss it wont. You know it all na.
Re: The Greatest Programmer On Nairaland by seunthomas: 3:50pm On Feb 26, 2016
FincoApps:


You criticize people's codes toooo much, it's becoming annoying. The painful thing is you don't bother to correct the code you criticized. See an example of correcting people's code without making them feel bad or inferior https://www.nairaland.com/2529139/tic-tac-toe-online-game. People make mistakes

Consider that you have written 2 codes or so on this thread and every single one had a mistake or 2 so please correct people's code instead of just bullshiting it
I try to but when i do people like you say am trying to pull other people down. So whats the point? I can only make my observations so people can look at it more deeply, i have explained the possible problems let them google it na.
Let me just explain that c language is a very dangerous language, their are things you can do in Java,C# or even C++ and get away with it but not in C
Re: The Greatest Programmer On Nairaland by seunthomas: 3:53pm On Feb 26, 2016
At this point(by some miracle) this thread is actually heading in the direction i want it too. Constructive criticism and brain wracking. Legends on the way......
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:53pm On Feb 26, 2016
guru01:

B is my choice answer.

Your answer is very wrong. WRONG in capital letters. The question says which of the following IS NOT true. Every recursive function that terminates MUST have a path that is not recursive.
Re: The Greatest Programmer On Nairaland by seunthomas: 3:59pm On Feb 26, 2016
@airsaylongcon
Shey u know go vex if i comment for your question(I dey suspect say na trick question).
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:59pm On Feb 26, 2016
dhtml18:

Simply conceding defeat would have been less-shameful.

Funny thing is despite me allowing him have a second try and effectively reducing his choice to just A or C he has gone ahead to make B his final choice. The question asked for which of the following is NOT true. Is it not true that for a recursive procedure to work there must be a path that is not recursive?
Re: The Greatest Programmer On Nairaland by seunthomas: 3:59pm On Feb 26, 2016
x=3;
function amADude(){
x=3;
amADude();


}
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:59pm On Feb 26, 2016
seunthomas:
@airsaylongcon
Shey u know go vex if i comment for your question(I dey suspect say na trick question).
It's NOT a trick question.
Re: The Greatest Programmer On Nairaland by seunthomas: 4:00pm On Feb 26, 2016
airsaylongcon:

It's NOT a trick question.
Can i do my analysis??
Re: The Greatest Programmer On Nairaland by airsaylongcon: 4:02pm On Feb 26, 2016
seunthomas:

Can i do my analysis??

The question was originally thrown at you. So feel free
Re: The Greatest Programmer On Nairaland by seunthomas: 4:10pm On Feb 26, 2016
airsaylongcon:


The question was originally thrown at you. So feel free
Well i have my reasons for not answering it na. Anyway down to my analysis.

A procedure "CallBack" is recursive for *some* inputs. If this procedure is guaranteed to terminate, then which of the following is not true.
a) CallBack has a local variable
b) CallBack has an path of execution where it is not recursive (doesn't call itself)
C) CallBack refers to a global variable or has one or more parameters
The name of the procedure (or function if you like) is CALLBACK.
This procedure is recursive if it gets certain values (eg 3 or 7 or 199 etc)
For other values it is not recursive.
Irrespective of whether it gets a value that makes it recursive or not recursive it WILL terminate.
Which of the options in A-C is not true given the above qualities of the procedure

Well this procedure is guaranteed to never enter an infinity loop
Assumption A
Can the fact the callback has a local variable stop it from exiting. Yes if the local variable is used in a conditional statement that will always happen
function a(){
x=1;
if(x==1){
a();

}
}
This function will run till enternity because the condition will always be true and the function will always be called again and again
Re: The Greatest Programmer On Nairaland by FincoApps(m): 4:14pm On Feb 26, 2016
seunthomas:
x=3;
function amADude(){
x=3;
amADude();


}

If dhtml was the one who wrote this, you would be the first to write BAD CODE smh
Re: The Greatest Programmer On Nairaland by seunthomas: 4:16pm On Feb 26, 2016
FincoApps:


If dhtml was the one who wrote this, you would be the first to write BAD CODE smh
Its not code MR JUMPER, its an algorithm. Make i shut my mouth as una no wan gree learn na.
Re: The Greatest Programmer On Nairaland by seunthomas: 4:17pm On Feb 26, 2016
But make he no be say i dey support @guru01 I think is answer is the most likely.
Re: The Greatest Programmer On Nairaland by airsaylongcon: 4:18pm On Feb 26, 2016
seunthomas:

Well i have my reasons for not answering it na. Anyway down to my analysis.

A procedure "CallBack" is recursive for *some* inputs. If this procedure is guaranteed to terminate, then which of the following is not true.
a) CallBack has a local variable
b) CallBack has an path of execution where it is not recursive (doesn't call itself)
C) CallBack refers to a global variable or has one or more parameters
The name of the procedure (or function if you like) is CALLBACK.
This procedure is recursive if it gets certain values (eg 3 or 7 or 199 etc)
For other values it is not recursive.
Irrespective of whether it gets a value that makes it recursive or not recursive it WILL terminate.
Which of the options in A-C is not true given the above qualities of the procedure

Well this procedure is guaranteed to never enter an infinity loop
Assumption A
Can the fact the callback has a local variable stop it from exiting. Yes if the local variable is used in a conditional statement that will always happen
function a(){
x=1;
if(x==1){
a();

}
}
This function will run till enternity because the condition will always be true and the function will always be called again and again

Consider this factorial function.

int factorial(int n)
{
if(n!=1)
return n*factorial(n-1);
}

This function is
1)recursive for some values (all values apart from 1)
2) is not recursive for some values ọ́in this case the integer 1)
3) is guaranteed to terminate.

Now can you explain your choice of answer using the above recursive function?
Re: The Greatest Programmer On Nairaland by Nobody: 4:21pm On Feb 26, 2016
Wow, 18 pages. This thread has gotten more attention than it deserves.

Someone will look at the thread with high expectations but will be disappointed to find chest beating immature programmers.
Re: The Greatest Programmer On Nairaland by airsaylongcon: 4:21pm On Feb 26, 2016
seunthomas:
But make he no be say i dey support @guru01 I think is answer is the most likely.

Are you implying that for a recursive function to work and terminate it doesn't need a path to escape from the recursive call?
Re: The Greatest Programmer On Nairaland by seunthomas: 4:22pm On Feb 26, 2016
airsaylongcon:


Consider this factorial function.

int factorial(int n)
{
if(n!=1)
return n*factorial(n-1);
}

This function is
1)recursive for some values (all values apart from 1)
2) is not recursive for some values ọ́in this case the integer 1)
3) is guaranteed to terminate.

Now can you explain your choice of answer using the above recursive function?
From your question, we are not limited to a specific function but any function except from the onset you question was not complete making it a trick question or wrong.

(1) (2) (3) ... (16) (17) (18) (19) (20) (21) (22) ... (39) (Reply)

Funny Programming Memes. Just For Laughs / How To Hack Your Girlfriend's Whatsapp And Fb Account / Atm Hacks "beware"

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 45
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.