Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,160,471 members, 7,843,445 topics. Date: Wednesday, 29 May 2024 at 05:06 AM

Teach Me How To Think Like A Programmer - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Teach Me How To Think Like A Programmer (758 Views)

I Need Someone To Teach Me Hacking / I Need A Tutor To Teach Me Coding / Who Can Teach Me Programming Around OTA, Ogun State (2) (3) (4)

(1) (Reply) (Go Down)

Teach Me How To Think Like A Programmer by Akhigbeblog(m): 12:35pm On Jun 24, 2020
Someone upload this(below) and nobody answered him lol grin, I just want to know your take on this . that's why I had to repost it again
Please, if you are JavaScript expert, I need your help in the following areas.

...

1. Teach me how to think like a programmer.
..
I have read so many articles but I'm yet to start thinking like a programmer.
..
I want to develop the kind of mindset that programmers have...
..
and how I can be able to create ideas in my mind and turn them to projects.

....

2. what are the basic things I need to learn in JavaScript before I can be a complete beginner. ..

...
3. Please tell me few things about the for in and for of loops.

I'm getting confused.

2 Likes

Re: Teach Me How To Think Like A Programmer by Nobody: 2:53pm On Jun 24, 2020
Nawa Oh it's something you develop by yourself.

1 Like

Re: Teach Me How To Think Like A Programmer by Coder2Client(m): 3:13pm On Jun 24, 2020
Nobody will teach you this, you are going to be when you engage in projects and when you want to add features to your project then you wear thinking cap.

1 Like

Re: Teach Me How To Think Like A Programmer by Shepherdd(m): 5:46pm On Jun 24, 2020
Ok let me try.

I have a test I always ask the few people I teach programming. My own teacher was also asked this same question. It goes as thus.

Imagine I am a computer, and assuming English is a programming language write out the steps in cooking me a spaghetti meal. Easy right?

I would get a result like :
Put the pot on the gas and pour in the spaghetti. This is total blunder try again.

Put the pot on the gas add water and add the spaghetti. Try again.

Ignite the gas now put the pot on the gas allow the water to boil add the spaghetti.... Here I add a hint that won't they remove the spaghetti from the nylon wrapper?

After some minutes of cycling I would get a fairly acceptable answer but still missing a key point which is serving me the meal after it's preparation which is a key point in my request prepare me a meal!!!

You see people have a popular statement saying computers are very dumb. You must have heard about the term garbage in garbage out regarding computers. Sometimes you pass garbage in through naivety or lack of skill. A good example of this is when I was implementing a fun chat system where two people can only chat when and only when they read the same book or article. I did something like this

Get user1 books and get user2 books
For books read by user1 and user2 if they equal then they can chat.

Well this was catastrophic in that all my new users can now chat without ever reading a book? Can you spot why in the code. I wasn't accounting for the fact that a new user would have None or null as their book and consequently None is equal to None when comparing two users and so they read a book in common None. Hilarious right? Computers are dumb or the programmer is dumber.

So good programmers are somewhat immune to this craziness by extensively practicing over the years. When you code over the years you will be able to spot these blunders in your head before you even code them.

Also reading people's code and trying to understand what's going on will help you. Dive into GitHub and look for interesting projects in JavaScript read the code and try to imagine what a code block is doing. Try and reverse engineer some parts of the project to be more efficient.

A JavaScript beginner should have knowledge on manipulation of arrays, strings, objects(although slightly advanced), and fundamental data types. Coercion, casting, Kings territory problem (let vs var vs const) is also recommended.

For in loop outputs the index of each element while For of outputs the value. For of also looks deep into the enumerable properties of objects which might land you into trouble as it will produce the index of functions as well. ( And yes arrays can also hold functions i.e Array.prototype) but can be avoided with something like if (if array.hasOwnProperty(index)).

Happy JavaScripting.

3 Likes

Re: Teach Me How To Think Like A Programmer by Akhigbeblog(m): 10:04pm On Jun 24, 2020
Shepherdd:
Ok let me try.

I have a test I always ask the few people I teach programming. My own teacher was also asked this same question. It goes as thus.

Imagine I am a computer, and assuming English is a programming language write out the steps in cooking me a spaghetti meal. Easy right?

I would get a result like :
Put the pot on the gas and pour in the spaghetti. This is total blunder try again.

Put the pot on the gas add water and add the spaghetti. Try again.

Ignite the gas now put the pot on the gas allow the water to boil add the spaghetti.... Here I add a hint that won't they remove the spaghetti from the nylon wrapper?

After some minutes of cycling I would get a fairly acceptable answer but still missing a key point which is serving me the meal after it's preparation which is a key point in my request prepare me a meal!!!

You see people have a popular stament saying computers are very dumb. You must have heard about the term garbage in garbage out. Sometimes you pass garbage in through naivety or lack of skill. A good example of this is when I was implementing a fun chat system where two people can only chat when and only when they read the same book or article. I did something like this

Get user1 books and get user2 books
For books read by user1 and user2 if they equal then they can chat.

Well this was catastrophic in that all my new users can now chat without ever reading a book? Can you spot why in the code. I wasn't accounting for the fact that a new would have None or null as their book and consequently None is equal to None when comparing two users and so they read a book in common None. Hilarious right? Computers are dumb or the programmer is dumber.

So good programmers are somewhat immune to this craziness by extensively practicing over the years. When you code over the years you will be able to spot this blunders in your head before you even code them.

Also reading people's code and trying to understand what's going on will help you. Dive into GitHub and look for interesting projects in JavaScript read the code and try to imagine what a code block is doing. Try and reverse engineer some parts of the project to be more efficient.

A JavaScript beginner should have knowledge on manipulation of arrays, strings, objects(although slightly advanced), and fundamental data types. Coercion, casting, Kings territory problem (let vs var vs const) is also recommended.

For in loop outputs the index of each element why For of outputs the value. For of also looks deep into the enumerable properties of objects which might land you into trouble as it will produce the index of functions as well. ( And yes arrays can also hold functions i.e Array.prototype) but can be avoided with something like if (if.hasOwnProperty(index)).

Happy JavaScripting.
Thanks
Re: Teach Me How To Think Like A Programmer by Nobody: 11:29pm On Jun 24, 2020
Ausrichie:
Nawa Oh it's something you develop by yourself.
u said it all
Re: Teach Me How To Think Like A Programmer by Nobody: 11:29pm On Jun 24, 2020
Coder2Client:
Nobody will teach you this, you are going to be when you engage in projects and when you want to add features to your project then you wear thinking cap.
exactly
Re: Teach Me How To Think Like A Programmer by Nobody: 11:45pm On Jun 24, 2020
U must be ready to learn from people n also be a fast learner, also try to change the code to the way u like it. If the video u are watching is coding A! try to do A in a different way. If it work stick to ur own style of doing A.


U must be determine, u must tell urself this pple that's doin this programming don't have 2heads.

Finally, practicing should be part of u. Be a curious person .
Person that want to knw aw things works. How people quote u in a post like nairaland, comment, create topics etc.

Curiosity will make u to start thinking like a programmer.

Have this at the back of ur mind U TELL THE COMPUTER WHAT TO DO N WHAT TO SAY. #youcan

3 Likes

Re: Teach Me How To Think Like A Programmer by Tim1212(m): 5:26am On Jun 25, 2020
The easiest way to think like a programmer is curiosity.
Try replicating popular website.. from there you will know how they think as well.

Create something similar
.. Facebook page, Twitter, MS word, Instagram and many.

That's what makes me perfect in programming

1 Like

Re: Teach Me How To Think Like A Programmer by squash47(m): 7:27am On Jun 25, 2020
Akhigbeblog:
Someone upload this(below) and nobody answered him lol grin, I just want to know your take on this . that's why I had to repost it again
I thought I was the only one having the problem. That was why I posted it o.
Thanks bro for reposting.
Re: Teach Me How To Think Like A Programmer by Akhigbeblog(m): 9:31am On Jun 25, 2020
squash47:
I thought I was the only one having the problem. That was why I posted it o.
Thanks bro for reposting.
It's fine bro
Re: Teach Me How To Think Like A Programmer by Akhigbeblog(m): 9:35am On Jun 25, 2020
squash47:
I thought I was the only one having the problem. That was why I posted it o.
Thanks bro for reposting.
I need some JavaScript pdf, I don't know if you have any you can please send dem through my email

1 Like

Re: Teach Me How To Think Like A Programmer by squash47(m): 9:52am On Jun 25, 2020
Akhigbeblog:

I need some JavaScript pdf, I don't know if you have any you can please send dem through my email
bro, PDFs don't work.


I'm using articles posted on so many random sites to form a note.

my syllabus is from javatpoint.com.


...

right now, I have 12 notes I'm using to study each topic separately.
if you don't write d notes by yourself, you won't learn fast. cos as u write them, you're also reading them.

...
it's a stressful but benefitial system of learning.
Re: Teach Me How To Think Like A Programmer by Nobody: 3:30pm On Jun 25, 2020
Shepherdd:
Ok let me try.

I have a test I always ask the few people I teach programming. My own teacher was also asked this same question. It goes as thus.

Imagine I am a computer, and assuming English is a programming language write out the steps in cooking me a spaghetti meal. Easy right?

I would get a result like :
Put the pot on the gas and pour in the spaghetti. This is total blunder try again.

Put the pot on the gas add water and add the spaghetti. Try again.

Ignite the gas now put the pot on the gas allow the water to boil add the spaghetti.... Here I add a hint that won't they remove the spaghetti from the nylon wrapper?

After some minutes of cycling I would get a fairly acceptable answer but still missing a key point which is serving me the meal after it's preparation which is a key point in my request prepare me a meal!!!

You see people have a popular statement saying computers are very dumb. You must have heard about the term garbage in garbage out regarding computers. Sometimes you pass garbage in through naivety or lack of skill. A good example of this is when I was implementing a fun chat system where two people can only chat when and only when they read the same book or article. I did something like this

Get user1 books and get user2 books
For books read by user1 and user2 if they equal then they can chat.

Well this was catastrophic in that all my new users can now chat without ever reading a book? Can you spot why in the code. I wasn't accounting for the fact that a new user would have None or null as their book and consequently None is equal to None when comparing two users and so they read a book in common None. Hilarious right? Computers are dumb or the programmer is dumber.

So good programmers are somewhat immune to this craziness by extensively practicing over the years. When you code over the years you will be able to spot these blunders in your head before you even code them.

Also reading people's code and trying to understand what's going on will help you. Dive into GitHub and look for interesting projects in JavaScript read the code and try to imagine what a code block is doing. Try and reverse engineer some parts of the project to be more efficient.

A JavaScript beginner should have knowledge on manipulation of arrays, strings, objects(although slightly advanced), and fundamental data types. Coercion, casting, Kings territory problem (let vs var vs const) is also recommended.

For in loop outputs the index of each element while For of outputs the value. For of also looks deep into the enumerable properties of objects which might land you into trouble as it will produce the index of functions as well. ( And yes arrays can also hold functions i.e Array.prototype) but can be avoided with something like if (if array.hasOwnProperty(index)).

Happy JavaScripting.
Reading other people's codes is the worst thing for C programmers. The bastard experts teach you with stupid words like "name a variable correctly", "use camel casing" bla bla bla. Dammit if you look at Linux or MINIX source code you'll just want to die.
Re: Teach Me How To Think Like A Programmer by Shepherdd(m): 4:41pm On Jun 25, 2020
Ausrichie:

Reading other people's codes is the worst thing for C programmers. The bastard experts teach you with stupid words like "name a variable correctly", "use camel casing" bla bla bla. Dammit if you look at Linux or MINIX source code you'll just want to die.

Ikr. Maybe it's due to the fact that there wasn't any form of standardization back then. But for c++ those gurus belong to different caliber and a fake c++ programmer (that only makes use of c style syntax) will surely find themselves lost reading c++ source code.
Re: Teach Me How To Think Like A Programmer by LilSfc(m): 7:19pm On Jun 25, 2020
Akhigbeblog:

I need some JavaScript pdf, I don't know if you have any you can please send dem through my email

Use eloquent JavaScript and thank me later.
Re: Teach Me How To Think Like A Programmer by bassdow: 11:40pm On Jun 25, 2020
Akhigbeblog:
Someone upload this(below) and nobody answered him lol grin, I just want to know your take on this . that's why I had to repost it again

It's very simple

1. Don't think like most Nigerians

2. You can't be good at Programming and Problem solving in general if you're very Religious - Religious people rely more (rather than use their brain even if it's just 30% of the time) on their Religious manuals and Leader to think on their Behalf. They rarely use their Brains which ends up making their Brains underdeveloped. There's a reason a Lawyer or Doctor is more Valuable the longer they are in service than those fresh out of school.

3. It's not about programming but about how you use your brain - how often and when last did you spend time battling that which doesn't just seem possible but has been certified as impossible by most who seem higher than you are in society.

4. If you had the slighteat opportunity to commit a crime, how quickly can you come up with a plan or tactics - I mean while still standing.

5. How quickly can you tell a good convincing Lie without thinking.
.
.
.
.
.
.
.
.

You can see, anyone can get trained as an Artist but for those who have it in them (the Naturals), they might not need much training to Excel more than you would .


But determination would help a lot only if you're willing to put in that work and resources needed.


Programming is just a language (just like we have Hausa, Igbo, Yoruba, English, etc) that computers understands directly or indirectly. Whatever magic they do is reliant on what you tell (program) them.


In the real world, if you're Logical and Objective in Reasoning, chances are you can do well in programming or any other fieod you find yourself.

There's something called "Algorithm" in computing - you can earn more doing that without knowing common HTML. You would have programmers interpreting those thoughts into Languages understandable to computers.
Don't forget programming is nothing but Translation of words/thoughts (Algorithms) into languages understandable to computers.



Once again, you would waste your time on Earth and/ or Frustrate your self if you're going into this field or any related because of the money you think they make.

Bye for now and sorry for the Epistle.
Re: Teach Me How To Think Like A Programmer by bassdow: 11:51pm On Jun 25, 2020
Shepherdd:
Ok let me try.

I have a test I always ask the few people I teach programming. My own teacher was also asked this same question. It goes as thus.

Imagine I am a computer, and assuming English is a programming language write out the steps in cooking me a spaghetti meal. Easy right?

I would get a result like :
Put the pot on the gas and pour in the spaghetti. This is total blunder try again.

Put the pot on the gas add water and add the spaghetti. Try again.

Ignite the gas now put the pot on the gas allow the water to boil add the spaghetti.... Here I add a hint that won't they remove the spaghetti from the nylon wrapper?

After some minutes of cycling I would get a fairly acceptable answer but still missing a key point which is serving me the meal after it's preparation which is a key point in my request prepare me a meal!!!

You see people have a popular statement saying computers are very dumb. You must have heard about the term garbage in garbage out regarding computers. Sometimes you pass garbage in through naivety or lack of skill. A good example of this is when I was implementing a fun chat system where two people can only chat when and only when they read the same book or article. I did something like this

Get user1 books and get user2 books
For books read by user1 and user2 if they equal then they can chat.

Well this was catastrophic in that all my new users can now chat without ever reading a book? Can you spot why in the code. I wasn't accounting for the fact that a new user would have None or null as their book and consequently None is equal to None when comparing two users and so they read a book in common None. Hilarious right? Computers are dumb or the programmer is dumber.

So good programmers are somewhat immune to this craziness by extensively practicing over the years. When you code over the years you will be able to spot these blunders in your head before you even code them.

Also reading people's code and trying to understand what's going on will help you. Dive into GitHub and look for interesting projects in JavaScript read the code and try to imagine what a code block is doing. Try and reverse engineer some parts of the project to be more efficient.

A JavaScript beginner should have knowledge on manipulation of arrays, strings, objects(although slightly advanced), and fundamental data types. Coercion, casting, Kings territory problem (let vs var vs const) is also recommended.

For in loop outputs the index of each element while For of outputs the value. For of also looks deep into the enumerable properties of objects which might land you into trouble as it will produce the index of functions as well. ( And yes arrays can also hold functions i.e Array.prototype) but can be avoided with something like if (if array.hasOwnProperty(index)).

Happy JavaScripting.


OP, make sure to read this multiple times.
Re: Teach Me How To Think Like A Programmer by Nobody: 11:56pm On Jun 25, 2020
Shepherdd:


Ikr. Maybe it's due to the fact that there wasn't any form of standardization back then. But for c++ those gurus belong to different caliber and a fake c++ programmer (that only makes use of c style syntax) will surely find themselves lost reading c++ source code.
I don't bother reading C++ source code. With the disgusting multi inheritance and the mountain of useless features, for example most tutors always advise to never use them, because too much of them becomes hard to trace at the end. And by the way ANSI standardised C a long time ago, the problem is that people were already used to the way they coded plus back when Dennis Ritchie (rest in peace) made C memory was so expensive and small so they had to make function and library names small to avoid loss of space, this also affected lots of things.
Re: Teach Me How To Think Like A Programmer by Nobody: 11:58pm On Jun 25, 2020
bassdow:


It's very simple

1. Don't think like most Nigerians

2. You can't be good at Programming and Problem solving in general if you're very Religious - Religious people rely more (rather than use their brain even if it's just 30% of the time) on their Religious manuals and Leader to think on their Behalf. They rarely use their Brains which ends up making their Brains underdeveloped. There's a reason a Lawyer or Doctor is more Valuable the longer they are in service than those fresh out of school.

3. It's not about programming but about how you use your brain - how often and when last did you spend time battling that which doesn't just seem possible but has been certified as impossible by most who seem higher than you are in society.

4. If you had the slighteat opportunity to commit a crime, how quickly can you come up with a plan or tactics - I mean while still standing.

5. How quickly can you tell a good convincing Lie without thinking.
.
.
.
.
.
.
.
.

You can see, anyone can get trained as an Artist but for those who have it in them (the Naturals), they might not need much training to Excel more than you would .


But determination would help a lot only if you're willing to put in that work and resources needed.


Programming is just a language (just like we have Hausa, Igbo, Yoruba, English, etc) that computers understands directly or indirectly. Whatever magic they do is reliant on what you tell (program) them.


In the real world, if you're Logical and Objective in Reasoning, chances are you can do well in programming or any other fieod you find yourself.

There's something called "Algorithm" in computing - you can earn more doing that without knowing common HTML. You would have programmers interpreting those thoughts into Languages understandable to computers.
Don't forget programming is nothing but Translation of words/thoughts (Algorithms) into languages understandable to computers.



Once again, you would waste your time on Earth and/ or Frustrate your self if you're going into this field or any related because of the money you think they make.

Bye for now and sorry for the Epistle.

At bolder, exactly what I keep on telling people. But programming is usually frustrating for people who interact with people a lot. If you tell your computer to add a number to a variable for example.
int main()
{
int b;
//add 3 to b directly
b+=3;
}
If you expected "b" to be zero then unfortunately the computer does not care he just adds 3 to whatever is there and happily continues on his way. There are many instances of the computer dumbly carrying on without caring about what you intended. Thats the most annoying thing about programming, there's a difference between what you intend to do and what you tell the computer to do
Re: Teach Me How To Think Like A Programmer by Shepherdd(m): 12:19am On Jun 26, 2020
Ausrichie:

I don't bother reading C++ source code. With the disgusting multi inheritance and the mountain of useless features, for example most tutors always advise to never use them, because too much of them becomes hard to trace at the end. And by the way ANSI standardised C a long time ago, the problem is that people were already used to the way they coded plus back when Dennis Ritchie (rest in peace) made C memory was so expensive and small so they had to make function and library names small to avoid loss of space, this also affected lots of things.
Yes and yes. C++ is a good example of a project getting out of hand. C was just like assembly in high level but C++ is just something else. And I meant something like community conventions like Python's snake casing and PEP 8 in general.
Re: Teach Me How To Think Like A Programmer by Nobody: 12:22am On Jun 26, 2020
Shepherdd:

Yes and yes. C++ is a good example of a project getting out of hand. C was just like assembly in high level but C++ is just something else. And I meant something like community conventions like Python's snake casing and PEP 8 in general.
I think the Bjarne (the maker of c++) should calm down and remove some unnecessary rubbish.
Re: Teach Me How To Think Like A Programmer by Etinosa1234: 12:32am On Jun 26, 2020
I don’t know abt others but I’ve been able to learn the basics (still learning) Of Java... But I find it hard to apply it

And if I then see an example,after learning it and mastering..I’m still unable to solve little problems

Besides I need someone I can readily WhatsApp to provide solutions to any problem I find w learning
Thanks
Re: Teach Me How To Think Like A Programmer by Nobody: 4:08am On Jun 26, 2020
Tim1212:
The easiest way to think like a programmer is curiosity.
Try replicating popular website.. from there you will know how they think as well.

Create something similar
.. Facebook page, Twitter, MS word, Instagram and many.

That's what makes me perfect in programming
hello sir which programming language did you learn first? I'm a novice infact I don't know anything yet
Re: Teach Me How To Think Like A Programmer by Tim1212(m): 5:09am On Jun 26, 2020
TheGodlessGod:
hello sir which programming language did you learn first? I'm a novice infact I don't know anything yet


I started with C+× , math, HTML5/CSS3 and Javascript...
With this language you can develop any software...

You can create your own language, framework, libraries and technology
Re: Teach Me How To Think Like A Programmer by Nobody: 5:11am On Jun 26, 2020
Tim1212:



I started with C+× , math, HTML5/CSS3 and Javascript...
With this language you can develop any software...

You can create your own language, framework, libraries and technology
can it also be used to create web pages like nairaland for example?

1 Like

Re: Teach Me How To Think Like A Programmer by Tim1212(m): 5:14am On Jun 26, 2020
TheGodlessGod:
can it also be used to create web pages like nairaland for example?

Yes , you can even create OS
Re: Teach Me How To Think Like A Programmer by Nobody: 5:16am On Jun 26, 2020
Tim1212:


Yes , you can even create OS
thanks alot, this programming is very complex and I'm already writing notes on it so it will help me to understand better.

1 Like

Re: Teach Me How To Think Like A Programmer by Nobody: 5:23am On Jun 26, 2020
..

(1) (Reply)

My First HTML Page / How Do I Stayed Focused To Actualize My Dream Of Becoming Software Developer. / Forex Market Algorithm IPDA part 2

(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. 92
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.