Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,716 members, 7,802,164 topics. Date: Friday, 19 April 2024 at 10:15 AM

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

Nairaland Forum / Science/Technology / Programming / The Greatest Programmer On Nairaland (64819 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) ... (15) (16) (17) (18) (19) (20) (21) ... (39) (Reply) (Go Down)

Re: The Greatest Programmer On Nairaland by Nobody: 2:55pm On Feb 26, 2016
mobolaji88:


Boss, I believe arguments and challenges should be language independent. Its a challenge to show who the best coder is not the best language user (if u get my point)

Here is the solution in PHP (and i can rewrite it nothing less than 20 languages - but that will just be showing off)

<?php
function strlength($s) {
$len=-1;
while(true) {$len++;if(substr($s,0,$len)==$s) {break;}};return $len;
}

echo strlength('dhtml18 is simply awesome');
?>

1 Like

Re: The Greatest Programmer On Nairaland by guru01(m): 2:58pm On Feb 26, 2016
airsaylongcon:


Duration?

*modified*
Off the top of my head

#include <stdio.h>
int main()
{
char str[100],i;
printf("Enter a string: \n"wink ;
scanf("%s",str);

for(i=0; str[i]!='\0'; ++i);
printf("\nLength of input string: %d",i);

return 0;
}

I have assumed that the maximum length of any string entered is 100. This can be modified upwards or downwards.

Ok.
Re: The Greatest Programmer On Nairaland by seunthomas: 2:58pm On Feb 26, 2016
CodeHouse:


You deserve a ban. Check Rule 15, youve done that countless times
Na which one be the censored word wey i post na??
Anyway na Night school you really go, those one na warning na the one wey dey red na him dey cause direct ban.......
Re: The Greatest Programmer On Nairaland by CodeHouse: 2:58pm On Feb 26, 2016
Dhtml please stop posting more codes.. this humiliation is too much and stop being NL convict grin
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:00pm On Feb 26, 2016
dhtml18:


Here is the solution in PHP (and i can rewrite it nothing less than 20 languages - but that will just be showing off)

I've written mine in C. Let him come and scrutinise it. I even thought he was going to hit me with a very hard question. Anyway you only get one shot and he has had his shot. I am still gonna ask him the same question I asked seunthomas
Re: The Greatest Programmer On Nairaland by seunthomas: 3:00pm On Feb 26, 2016
CodeHouse:
Dhtml please stop posting more codes.. this humiliation is too much and stop being NL convict grin
You, dem don dey prepare your cell block, na 10 years ban you go get..
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:01pm On Feb 26, 2016
guru01:

Ok.

OK means what? That my code is incorrect?
Re: The Greatest Programmer On Nairaland by seunthomas: 3:01pm On Feb 26, 2016
airsaylongcon:


I've written mine in C. Let him come and scrutinise it. I even thought he was going to hit me with a very hard question. Anyway you only get one shot and he has had his shot. I am still gonna ask him the same question I asked seunthomas
Na with mouth you write am? Show us the code na.... Oga warehouse manager
Re: The Greatest Programmer On Nairaland by Nobody: 3:01pm On Feb 26, 2016
seunthomas:

You, dem don dey prepare your cell block, na 10 years ban you go get..
Impossible, no cell can hold me, i be like virus for this nairaland.
Re: The Greatest Programmer On Nairaland by guru01(m): 3:03pm On Feb 26, 2016
airsaylongcon:


I've written mine in C. Let him come and scrutinise it. I even thought he was going to hit me with a very hard question. Anyway you only get one shot and he has had his shot. I am still gonna ask him the same question I asked seunthomas
Waiting for your next question.
Re: The Greatest Programmer On Nairaland by CodeHouse: 3:03pm On Feb 26, 2016
seunthomas:

You, dem don dey prepare your cell block, na 10 years ban you go get..

Mscheeeew..maybe you are Osewa Seun hiding behind the monicker seunthomas, that one is your business, and you mentioned ban as if it determines my speed on the keyboard... Uffffff

I guess I should be shaking now.. Huh ?
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:03pm On Feb 26, 2016
seunthomas:

Na with mouth you write am? Show us the code na.... Oga warehouse manager

Seunthomas you should learn to read before talking.

Here it is again

Off the top of my head

#include <stdio.h>
int main()
{
char str[100],i;
printf("Enter a string: \n"wink ;
scanf("%s",str);

for(i=0; str[i]!='\0'; ++i);
printf("\nLength of input string: %d",i);

return 0;
}

I have assumed that the maximum length of any string entered is 100. This can be modified upwards or downwards.

I have used '\0' to indicate end of the thread
Re: The Greatest Programmer On Nairaland by Nobody: 3:05pm On Feb 26, 2016
^^You mean he actually talks before reading?
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:06pm On Feb 26, 2016
guru01:

Waiting for your next question.

You haven't told me if my answer is correct or not.
Re: The Greatest Programmer On Nairaland by seunthomas: 3:07pm On Feb 26, 2016
CodeHouse:


Mscheeeew..maybe you are Osewa Seun hiding behind the monicker seunthomas, that one is your business, and you mentioned ban as if it determines my speed on the keyboard... Uffffff

I guess I should be shaking now.. Huh ?
na am not dat dude. He is just my name sake. Nice guy i hear but me am just here for the fun. But i have connection all over the world both dark and light web. So if i make you my case, na CIA go carry u ohhhh. Guantanamo things.....
Re: The Greatest Programmer On Nairaland by Nobody: 3:07pm On Feb 26, 2016
@seunthomas boss, @dhtml18 and @airsaylongcon have produced well crafted codes that do not need debuggers to see if they work (I.e simple and precise).

It would do a lot of honour to your monicker if, you can pls produce some piece of code to show your worth

1 Like

Re: The Greatest Programmer On Nairaland by guru01(m): 3:08pm On Feb 26, 2016
airsaylongcon:


You haven't told me if my answer is correct or not.
I said your answer is ok.
It seems you like talking abi....
Re: The Greatest Programmer On Nairaland by seunthomas: 3:08pm On Feb 26, 2016
airsaylongcon:


Seunthomas you should learn to read before talking.

Here it is again

Off the top of my head

#include <stdio.h>
int main()
{
char str[100],i;
printf("Enter a string: \n"wink ;
scanf("%s",str);

for(i=0; str[i]!='\0'; ++i);
printf("\nLength of input string: %d",i);

return 0;
}

I have assumed that the maximum length of any string entered is 100. This can be modified upwards or downwards.

I have used '\0' to indicate end of the thread
Na which kind code you write? You go crash ya system ohhh. See memory corruption in the making.....
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:11pm On Feb 26, 2016
seunthomas:

Na which kind code you write? You go crash ya system ohhh. See memory corruption in the making.....


Hear what you master said when I asked him if my code was correct.

guru01:

I said your answer is ok.
It seems you like talking abi....

So please critique my code
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:14pm On Feb 26, 2016
Guru01

Here's you question

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
Re: The Greatest Programmer On Nairaland by Nobody: 3:18pm On Feb 26, 2016
mobolaji88:
@seunthomas boss, @dhtml18 and @airsaylongcon have produced well crafted codes that do not need debuggers to see if they work (I.e simple and precise).

It would do a lot of honour to your monicker if, you can pls produce some piece of code to show your worth
Very funny, i am just catching my fun on this thread o jare.
Re: The Greatest Programmer On Nairaland by seunthomas: 3:18pm On Feb 26, 2016
airsaylongcon:


Hear what you master said when I asked him if my code was correct.



So please critique my code
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.....
Re: The Greatest Programmer On Nairaland by Nobody: 3:20pm 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.
Lawd have mercy!!
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:21pm 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.

Semantics. I have abundance of memory I don't care about segmentation fault or memory corruption. The koko is that the almighty problem he gave me was solved. Is this true or not? Wasn't he the same person that you alleged will kill me with an unanswerable question?
Re: The Greatest Programmer On Nairaland by sapientia(m): 3:21pm 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.

Can you at least write the one that may not get segmentation or memory corruption?
Re: The Greatest Programmer On Nairaland by seunthomas: 3:23pm On Feb 26, 2016
airsaylongcon:


Semantics. I have abundance of memory I don't care about segmentation fault or memory corruption. The koko is that the almighty problem he gave me was solved. Is this true or not? Wasn't he the same person that you alleged will kill me with an unanswerable question?
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.....
Re: The Greatest Programmer On Nairaland by seunthomas: 3:24pm On Feb 26, 2016
sapientia:


Can you at least write the one that may not get segmentation or memory corruption?
Its not my fight(I wont). Contact me directly if you want the approximate solution.
Re: The Greatest Programmer On Nairaland by airsaylongcon: 3:24pm On Feb 26, 2016
Guru01

You gave me a question at 2:46pm and at 2:48pm I had a solution ready. I gave you mine at 3:14pm and 10mins after you are still silent. Is everything OK?

1 Like

Re: The Greatest Programmer On Nairaland by guru01(m): 3:25pm On Feb 26, 2016
airsaylongcon:
Guru01

Here's you question

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

Sorry, you question is not clear enough to me.
But i think B is the correct answer.
Am i correct or not.
Re: The Greatest Programmer On Nairaland by Knownpal(m): 3:26pm On Feb 26, 2016
Sometimes in thread like these all you need to do is to keep reading, you won't know what to write, I don't know whether am learning or what self. well sha. I look forward to the person that will make the last post on this thread.

seunthomas and dhtml are like Paul and Barnabas.


bible reference : grin grin

Barnabas wanted to take John, also called Mark, with them, but Paul did not think it wise to take him, because he had deserted them in Pamphylia and had not continued with them in the work. They had such a sharp disagreement that they parted company.


CodeHouse I sight you sir.
Re: The Greatest Programmer On Nairaland by guru01(m): 3:26pm On Feb 26, 2016
airsaylongcon:
Guru01

You gave me a question at 2:46pm and at 2:48pm I had a solution ready. I gave you mine at 3:14pm and 10mins after you are still silent. Is everything OK?
You talk too much and it make me bored.
Re: The Greatest Programmer On Nairaland by Nobody: 3:26pm On Feb 26, 2016
@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).

sapientia:

Can you at least write the one that may not get segmentation or memory corruption?
Better dont take that joker seriously, he just likes running his mouth recursively.

(1) (2) (3) ... (15) (16) (17) (18) (19) (20) (21) ... (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. 60
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.