₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,331,137 members, 8,448,830 topics. Date: Monday, 20 July 2026 at 09:43 PM

Toggle theme

Blueyedgeek's Posts

Nairaland ForumBlueyedgeek's ProfileBlueyedgeek's Posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (of 15 pages)

ProgrammingRe: New Hub For Nigerian Programmers by blueyedgeek(m): 9:44pm On Nov 16, 2014
zeroshadow:
Bad choice of words.
Tried as hard as I could to be politically correct but couldn't find any other word to describe it.
ProgrammingRe: New Hub For Nigerian Programmers by blueyedgeek(m):
Craigston:
I found one: tswebschool. It seems it is meant to be a tutorials site, but it also has a forum. Maybe we can promote them. Let us help our fellow Nigerians.
Are you the owner of the site? it needs a lot of improvements.
ProgrammingRe: New Hub For Nigerian Programmers by blueyedgeek(m):
There is also Nairaland.com created by our very own dhtml

update: corrected above link
ProgrammingRe: Javascript Study Group by blueyedgeek(op): 3:32pm On Nov 16, 2014
Javascript study plan for Advanced Newbies.

Prerequisites: Basic knowledge of HTML and CSS (you should be able to at least whip up a static web page or something similar) and a desire to learn and improve on what you already know.

Duration: I wanted to set a time-frame but decided not to as that might just hurt the learning process if we try to rush things. We are going to take it slow and steady but if we are to set a time frame to get up and running then 4 weeks should be enough to get the basic concepts nailed down. Learning never really ends as we must keep learning to stay at the top of our game.

Signing Up: A group will be created on whatsapp specifically for this study group. Signing up is really easy, all you have to do is indicate your interest in this thread and drop your number and you will be added to the group. We shall be using the group and this thread for discussions related to the subject of study -- javascript. (HTML & CSS are also allowed but the main focus is on javascript). This thread will be the main discussion area and the whatsapp group is supplemental.

Additional information:
1. Programming is hard!! those that came before you had to sweat it out before they became good at what they do so do not get frustrated if you find some things hard to comprehend or find yourself struggling. Just keep plugging away and your efforts will be rewarded. We are also here to help each other and we should be asking any questions we have here or in the group.

2. We will be having assignments each week and we are expected to drop our solutions + questions here for vetting, correction etc....

Study Guide

We are going to start with the basics (for those of us who already know a thing or two, this will just be like a refresher).

BASICS/REFRESHER (required)
Read the articles on the following links to get a feel for what JavaScript is and why it is useful.

1. Getting started with Javascript - MDN
2. Programming, the real basics - Webplatform
3. Javascript best practices - Webplatform

NOTE: If you are an absolute newbie to JavaScript (and maybe html and css) and you feel like the articles above are not enough to get you started then you should visit [url=http"//www.codecademy.com]Codecademy[/url]. Codecademy is a site that teaches you how to code using various languages, the site is pretty interactive and their lessons are concise and straight to the point. Create an account and work through their JavaScript track, it should take about 10 hours to complete if you put in enough effort but you can go as slow as you want and take as much time as you need to complete it. Alternatively, if you are totally new to the world of web development, you shouldn't be starting with JavaScript, you should as well create an account on Codecademy and work through their HTML / CSS track. That should get you up and running.

WEEK ONE
This is where the real fun starts. We are going to be using the book Eloquent JavaScript for this study guide.

Download book here.

There is an online version of the book available at eloquentjavascript.net which is really useful if you want to use the code sandbox that comes with the book.

The book comes with 21 chapters and we are going to be splitting the reading into bits and pieces.

REQUIRED READING

*** Read this article to get warmed up A re-introduction to JavaScript -MDN

*** Read the introduction as well as chapters 1 and 2 of Eloquent JavaScript

ASSIGNMENT

*** Solve one out of the three exercises in chapter two of Eloquent JavaScript (try to solve them yourself before looking at the answers, it is more rewarding). If you are feeling like such a JavaScript ninja, go ahead and solve all three.

*** Solve this problem using JavaScript:

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.


Source

FINAL NOTES
You can post your solutions on JsFiddle and post the link here or in the group to be created (post your number here to be added).

If you have any questions to ask, feel free to post them here.

At the beginning of a new week, this post will be updated with new weekly tasks so you might have to keep checking this post for updates.

tag: @zicjoe, @chimanet
ProgrammingRe: Javascript Study Group by blueyedgeek(op): 11:42am On Nov 16, 2014
zicjoe:
the latter is beta. wic do you prefer?
Cool with either. Just give me some time to develop a study plan. I will update this post before the end of today.
ProgrammingRe: Javascript Study Group by blueyedgeek(op): 9:26pm On Nov 15, 2014
Chimanet:
So happy to see some people thinking in the same direction am thinking at the oment.i heve been a Java/J2EE developer for some couple of years now but for now i have been studying plain javascript, the language construct, for the past one week. and i will say it is such a fun and crazy language at the same time. the whole functional, closure and prototypal inheritance thing is just so weird and powerful. anyway am not yet advanced in javascript for now, but am trying to give it the full attention it deserves. so we could study together if you want, at least we can be the few javascript Ninjas in nairaland, or Nigeria because i dont think their is much of them at the moment. my email is xhimat123@gmail.com. and my number is 08060880402.
cool, just waiting for Zicjoe's reply.
ProgrammingRe: Javascript Study Group by blueyedgeek(op): 9:18pm On Nov 15, 2014
zicjoe:
i've look it up in google. I think its ok.
Do you plan to follow it or should we create a curriculum focused around javascript alone?

I'm talking javascript in-
depth and all the fancy new frameworks.
ProgrammingRe: Javascript Study Group by blueyedgeek(op): 5:42pm On Nov 15, 2014
zicjoe:
nope, wat abt it?
The odin project enables aspiring web developers
to reach their goals by providing access to a wide range of resources in a well structured way. You know when you're in school, your teachers use some kind of syllabus in passing information to you. Basically, the odin project provides you with a curriculum to follow while learning on your own. One thing though, the curriculum is focused on Ruby as the server side language.

You should google it and tell me if it's a nice fit for you.
ProgrammingRe: Javascript Study Group by blueyedgeek(op): 4:58pm On Nov 15, 2014
zicjoe:
im an advance beginner. Full stack tins all d way. Up to u nw.
Cool, ever heard of the odin project?
ProgrammingRe: Javascript Study Group by blueyedgeek(op): 3:16pm On Nov 15, 2014
zicjoe:
yea. i lyk dis. hw e go b?
I will like to know how far you have come with javascript, total newbie or advanced beginner? Also, I would like to know what end of the spectrum you want to fall into in web development,

Front end development - which involves client side codes that run in the browser

Back end development - which involves server side coding

Or full stack - front end + back end combined into one.

There's no correct answer, I just want to know how far you have come and where you would like to go from here.
ProgrammingRe: Javascript Study Group by blueyedgeek(op): 12:07pm On Nov 15, 2014
ProgrammingRe: Javascript Study Group by blueyedgeek(op): 9:44am On Nov 15, 2014
zeroshadow:
Nothing beats self education.
You clearly did not understand my post. I'm not against self education (I'm doing it myself). What I'm trying to say is that if there's anyone new to it and needs someone going along, then I'm game.
ProgrammingRe: Javascript Study Group by blueyedgeek(op): 9:19am On Nov 15, 2014
If there's anyone here just getting into javascript and needs a well structured study plan or something like a curriculum to follow, please indicate here. Learning alone can be brutal, trust me.
ProgrammingRe: ATTENTION: Programming Logic Comparison by blueyedgeek(m): 9:06am On Nov 14, 2014
bruceleah:
I don't seem to understand line 3 of ur code.

What if this logic was simplified:

If (validUser(user)) {
If (validPword(user,pword)) {
// Do something
} else {
"Mismatch";
}
} else {
"No user";
}

Instead of

If (validUser(user) && validPword(user,pword)) {
//Do something
} else {
"Mismatch"
}

Note: the goal is to prompt user if user name does not exist and if there's a mismatch.
Cool, I'm actually learning quite a few things from this thread although I do think we might have gone off tangent here from the initial op which is if there is a difference between both and as I have pointed out, there isn't much difference between both except in special cases.
ProgrammingRe: ATTENTION: Programming Logic Comparison by blueyedgeek(m): 9:51pm On Nov 13, 2014
bruceleah:
Boss, I actually want to let the user know if the specified username exists in our db, not just match username and password (throw a username does not match database)

I also want to throw an error like "user does not exist in our database"

First check if user exist in db before matching username and password.

How would you go about it?
! == does not

if user && password match database
'Success'
Else if user !match && password match
'User does not match database'
Else if user match && password !match
'Incorrect password'
Else
'Incorrect user and password'
ProgrammingRe: ATTENTION: Programming Logic Comparison by blueyedgeek(m): 9:38pm On Nov 13, 2014
GozieDiora:
Well, from the stand point of computer programming purity and code optimisation, one is actually better.

Here is the gist:

In the first scenario (I.e. using the logical operator), compilers equiped with code optimisation functionality (like Object Pascal etc) take advantage of this structure to reduce total execution time by handling only one side of the operator in the best case scenario. In other words, the second side is executed if and only if the first part evaluates to be false (for logical OR). This goes a long way to increase speed and reduce run time memory consumption. However, this benefit can only be remarkable in data crunching programs like large file processing, batch processing especially in ERP's etc. IDE's like Netbeans for Java language, Morph X for X++ etc. which show approximate execution time would show this for very large amount of data.

In the second, still on logical OR, provided the first condition is true, the second must run.

So if OR is the intended logic, it would pay to use the first structure for code optimisation.
learnt from this post.
ProgrammingRe: ATTENTION: Programming Logic Comparison by blueyedgeek(m): 7:51pm On Nov 13, 2014
bruceleah:
I quite agree with you boss. Judging with this example, there's no difference. How about u explain this.

I want to check if a username actually exist in our database, and check if the password matches the specified user name.

Note: I want to let the user know if d specified user name exists in my db, I just don't want to throw a mismatch error.

I know it's not advisable as a programmer, let's just assume I wanna implement this. How wld u go about it?
pseudo code

If username matches database && password matches as well --
'Successful log in''
Else
Throw error
'Username or password doesn't match database'
ProgrammingRe: ATTENTION: Programming Logic Comparison by blueyedgeek(m): 7:07pm On Nov 13, 2014
GozieDiora:
Yes sir, and both snippets are practically useless as they have no logical implication. In other word, the presence or absence of the control structures will not in any way alter the flow of logic since they will both evaluate to TRUE.

Question, though both structures give the same result, is anyone better than the other? If so, which one?

...... or is it subject to end goal?

Regards.
In my opinion, none is better than the other. They are both identical in functionality and performance but I would favour the '&&' syntax over nesting multiple if statements since it is more readable.

welcome back sir.
ProgrammingRe: ATTENTION: Programming Logic Comparison by blueyedgeek(m): 7:00pm On Nov 13, 2014
bruceleah:
Sure boss, it would, I agree. But this might not be applicable to other scenarios like the first one I painted.
If you had passed a statement to be executed when the condition in the first if block is met and another statement to be executed if the second condition is met then it becomes something else.

Example:

if(9 > 7){
console.log('do something');
if(7 > 22){
console.log('do something else');
}
}


If this code is run, the statement in the first if block will be printed to the console and the second will be ignored. In this context, it does not do the same thing as using the
if(condition && condition){
//do something
}

but when you begin to nest multiple if statements and only one expression will be executed then they become the same thing. It doesn't matter how many nesting levels you go as far as all the if statements are used for one expression then it is the same thing as using the
if(condition && condition){
//do something
}

Example:


if(5 > 4){
if(6 > 5){
if(7 > 6){
if(8 > 7){
if(9 > 8 ) {
if(10 > 9){
console.log("This will only print if all conditions in the if statement are true" );
}
}
}
}
}
}


Is the same thing as:

Example:


if(5 > 4 && 6 > 5 && 7 > 6 && 8 > 7 && 9 > 8 && 10 > 9){
console.log("This will only print if all conditions in the if statement are true" );
}


Run both code snippets and you will get the exact same result. The second method is just a more compact form and more readable. There really is no difference.
ProgrammingRe: ATTENTION: Programming Logic Comparison by blueyedgeek(m): 6:24pm On Nov 13, 2014
bruceleah:
I quite agree with you. But what if we wanna check if 7 is less than 9 but equal to 8? The first example can't handle that but the second will

For instance:

f(9 > 7){
if(7 < 9){
console.log('true');
} else {
Console.write("8"wink;
}
}
I don't quite get you bro, what do you mean by checking if 7 is less than 9 but equal to 8?

By the way, If we add the else block to the first method, you'll get the same result anyway.
Web MarketRe: Purchase This Website FREE by blueyedgeek(m): 6:12pm On Nov 13, 2014
This section isn't the best place for such.

Your site also needs some major ui love...... Just saying.
ProgrammingRe: ATTENTION: Programming Logic Comparison by blueyedgeek(m): 6:08pm On Nov 13, 2014
There really is no difference between both as they are basically different ways to do the same thing which is check to make sure that two expressions in the condition are met before any code statement is executed. The first method is a more compact form.

Just like we have the while and for loop, both are used for the same thing but the for loop allows you to keep all your code expressions in one statement making it a more compact form.

An example.

if(9 > 7 && 7 < 9){
console.log('true');
}


Will give the same result as:

if(9 > 7){
if(7 < 9){
console.log('true');
}
}
ProgrammingRe: Free Web Hosting And Domain Websites by blueyedgeek(m): 7:22am On Nov 06, 2014
Check out one.com. They offer free web hosting for a whole year. The catch is that you have to pay for domain name.
ProgrammingRe: I Bet You Cant Do This With Javascript, *check Out* by blueyedgeek(m): 7:02am On Nov 02, 2014
Cybergenius:
you are wrong you didn't follow the rule, where is the idf variable?

function identify(q){
return function(){
return q;
}
}

idf = identify(3);
idf() //3
Oh, I'm supposed to set a variable equal to the result of calling the identify function. Why do I need to call it like a function?
ProgrammingRe: Help Am Stucked by blueyedgeek(m): 9:49pm On Nov 01, 2014
You know python is pretty strict about indentation. Check to make sure your code is well indented. I don't really know much about Python but if what you are trying to do is to loop through an array and print out every item in it, here is how it would be done using javascript


var names = ["ayo"
, "tola", "dapo"];
for(var count = 0; count < names.length; count++){
console.log(names[count]);
}


Now, you might wonder how this is helpful but I am under the assumption that all programming languages at their core follow the same basic principles so using mine, I would infer that your code might not be working because your syntax might be incorrect. You need to use the length of the array in your loop statement (I'm not sure how this is done in python)
and also for the print statement, it should be print(names[each_item]) and not just print(each_item).
ProgrammingRe: I Bet You Cant Do This With Javascript, *check Out* by blueyedgeek(m): 5:14pm On Nov 01, 2014
This should be pretty easy to implement.

function identify(val){
this.val = val;
return val;
}
identify(3) --> 3
identify("Tunde" ) --> "Tunde"
identify({name: "Osewa"}) --> Object {name: "Osewa"}

ProgrammingRe: Why do people c0mpare html and php? by blueyedgeek(m): 8:30pm On Oct 29, 2014
HTML is the basis for everything you find on the web but it is pretty limited in what it can do. At the core, HTML can only serve static content and that is it, languages like PHP, Ruby, Python, Javascript, asp.net etc. only serve to enhance HTML beyond it's basic capabilities.



HTML alone:
Lex Luthor - pretty formidable


HTML + PHP:
Lex Luthor + Braniac - armageddon doesn't properly describe this.
Tech JobsRe: Intern Needed by blueyedgeek(m): 9:51pm On Oct 28, 2014
Good day,

** What would you consider basic knowledge?

** Must one be familiar with all languages/frameworks/IDE(s) specified? (Emphasis on all)

** Would you take someone who knows HTML/CSS and is fairly comfortable with Javascript but is willing to learn as many languages/frameworks as possible?
ProgrammingRe: This Is My 1st Web App Ever - A Search Engine For Africans by blueyedgeek(m): 9:29pm On Oct 28, 2014
Interactivity is nonexistent on mobile using opera mini. (It doesn't even do anything at all)

Consider adding a bit more information on the site detailing what the app is for and how it is useful, "search for jobs in Africa" isn't enough. Try to add a bit more "activity" to the app, it feels a bit "lonely".

Additionally, if your app uses only client side codes, you should consider hosting it on github pages, at least, that would get rid of the ads.

I checked it on opera mini, will update this post once I check it on pc.
Christianity EtcRe: Are There Smart People In Heaven? by blueyedgeek(m): 5:47pm On Oct 26, 2014
asalimpo:
you wont be there,being an atheists, so this question doesnt need to bother u.
I'm more of a non-theist than an atheist. Both are fancy words for someone who doesn't believe in deities but there is a subtle difference.

BTW, who tell you say I no go dey there? Bros, dis tin wey u talk so, e be like say na you gan gan go judge me that day. Make I take style beg........ Bros abeg if na you stand for gate that day, abeg let make I pass, I go give you my sister marry. Thanks in advance.
Christianity EtcRe: Are There Smart People In Heaven? by blueyedgeek(m): 2:00pm On Oct 26, 2014
asalimpo:
Everybody will have and operate from a sound mind (the mind of Christ). The kindof mind Adam had bf d fall.
Oh great, man's curiosity would get the better of him again and we have the fall version 2.0.

Why would anyone want to return to such a state? I mean, full grown men and ladies running around naked and just too plain dumb to realize what they are doing.

I'll rather be non existent.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (of 15 pages)