Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,147,913 members, 7,799,082 topics. Date: Tuesday, 16 April 2024 at 03:00 PM

Craigston's Posts

Nairaland Forum / Craigston's Profile / Craigston's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (of 27 pages)

Programming / Re: I Can Code In 75 Languages!!! by Craigston: 10:51pm On Jul 23, 2016
tr3y:


Okay now I get you.
You are a semantic markup crusader grin, I am too even though I still mix it sometimes (Don't judge).
You still have to worry about cross-browser compatibility especially if you are using vanilla JavaScript.
Cross-browser compatibility has actually improved greatly, unless you want to support really old browsers which only a few 'software museum' dwellers use (XP users?).
Business / Re: How Nigerian Businesses Can Improve Sales Through Data Analysis by Craigston: 10:39pm On Jul 23, 2016
I think data analysis is good as long as the data analyzed does not violate your customer's privacy. Intrusive data collection may become a tempting prospect as other competitors adopt the techniques and the methods become almost insufficient for sustained competition. This is partly due to lack of innovation in the methods used and a lazy preference for intrusive data collection.

1 Like

Programming / Re: I Can Code In 75 Languages!!! by Craigston: 5:47pm On Jul 23, 2016
tr3y:

Who does that?
Listen to all event then use the event Object to determine what event it is? You create event handlers before even thinking of passing the Object
You listen for an event and once it occurs you have your callback to which you pass in the event Object.
that is why we have stopPropagation and preventDefault, how will you make use of them if you don't pass in the event Object to your callback?
Of course you can still use stopPropagation and preventDefault. And it's not different from listening to an event. It only helps you write cleaner, more maintainable code and separates behavior, presentation and structure.
Using html event trigger attributes such as onClick, onBlur, etc mix more JavaScript into your html which should be avoided. Instead of using those, query the elements you're interested in and use addEventListener() to attach event handlers to them. That makes your code more readable. It becomes clearer on first glance what your function is meant to achieve. Your html becomes free of JavaScript too.
I used this technique to write a template for a friend and reading the code was enjoyable. You understand the document structure better since it is almost html alone. Similarly, the JavaScript file was shorter and cleaner.
Programming / Re: I Just Wrote What Might Be The Worst System Ever Programmed In This Country by Craigston: 3:41pm On Jul 23, 2016
webninja:
@OP this section is about programming, stop posting silly escapades here about you or your shitty larisoftng blog.. reason the programming section is full of low quality Posts no moderation at all..
Really?
Programming / Re: I Can Code In 75 Languages!!! by Craigston: 3:18pm On Jul 23, 2016
dhtml18:

Reason: it is good and recommended practice.
That was real scolding for FincoApps. What do you have to say, finco?

FincoApps:


Why ?

And please give a clear reason...
Just think about what happens when you're trying to manage many click events across different versions of a site design and you're using only the 'event' object to determine what event it is and, if it's a click event, which HTML object was clicked. It becomes harder to manage as it grows larger, even with your debugging tools to help. Attaching event triggers to each object of interest makes it easier to manage.
Programming / Re: Share Your Gdevit.com Experience Here! All Trolls, Bots etc - stay out!! by Craigston: 2:34pm On Jul 23, 2016
My only suggestion, for now, is that the owner(s) of gdevit should add a bot that filters usernames against a set of known trolls (dhtml?) and continuously improve the bot to detect trolls before they even register (Nairaland will be a good source of samples).
BTW I wonder why pa Troll is trying to keep his thread clean of trolls when it had already been polluted before he created it.
Programming / Re: I Can Code In 75 Languages!!! by Craigston: 6:57pm On Jul 22, 2016
tr3y:
Should have pass in the event object instead of this
It's actually better -- a good practice -- to avoid using event triggers and the 'event' object, except there's no other option.
Using event handlers and element queries is better and your program's behavior should be predictable.
Programming / Re: I Can Code In 75 Languages!!! by Craigston: 9:42am On Jul 22, 2016
godofbrowser:


Your onclick event needs review Cos even without running the code, I can tell from experience that "this" as an argument won't give u the name of the id but will rather return it as an html object. also, u can't place "this" and another argument that way together. there is a trick to doing that. There's every possibility that this code won't run properly.
You're correct. The html object is return to the parameter 'h' in the showLangs function. The code will run properly but the 'var b' is unused and should be removed.

2 Likes

Webmasters / Re: Javascript Framework Or Regular Javascript? by Craigston: 9:54pm On Jul 21, 2016
yawatide:
@webdeveloperqx
Your answer is at the core of what I am driving at smiley

On a slightly different topic, it's the same reason why I tell people that since the Book of Mormon, that used by the Catholics, etc all reference the Bible, why not just go straight to the Bible. After all, it is the "oliginal". Not having a basic understanding of pure javascript can often lead to abuse of the frameworks, overuse and unnecessary use, to mention but a few. In other words, if all you are doing is, say, doing a DOM manipulation or 2 on a site, is it worth importing KBs of jQuery, thus increasing page load time?

More comments please...

JavaScript libraries/frameworks are great for their purposes. What gets ugly is having users download large files, most of which doesn't get used on the web page. If all I'm doing is simple DOM manipulation, I implement it in actual JavaScript, without any framework/library.
But try building a 3D game in traditional JavaScript only and you'll know what's good about libraries/frameworks.
Generally I try to write as little code as possible to get the job done. It makes the browser happy, the user gets to save more on data bundles and I spend less time debugging. Everyone's happy.

2 Likes

Programming / Re: I Can Code In 75 Languages!!! by Craigston: 8:51pm On Jul 18, 2016
crotonite:

0(log(n2)) grin
You mean O(3nlog(n))?
Hehehehehe. I think it's actually O(1), just infinite.
Jacob05 come and see what you're missing o. Dhtml18 and co on an e-war. Dem go soon ban oga dhtml again. This time he will be sent to Nairaland bottomless database.
Programming / Re: What's Your Favorite Linux Distro by Craigston: 6:22pm On Jul 17, 2016
I use anyone that's good enough. If I need a special-purpose distro, I'll get it.
I've used Ubuntu, Fedora, Debian and Slackware. I've tested Elementary, Mint, Zorin and Kali. Currently I use Debian 8 (Jessie).
I had to settle for just one because I was running out of disk space.
Fedora is cool but the release cycle is too fast for us that have limited data bundles.
My Slackware disk will always be here: it's easy to get a PC running Slackware and start working comfortably even when you have limited data.
Ubuntu and Debian are also good and I'm not leaving them soon.
Webmasters / Re: Is My Website Ugly?? by Craigston: 10:27am On Jul 16, 2016
You're imitating Facebook's theme which is bad for branding.
Your choice of colors need some attention: in the first image brown does not blend well with blue
Good attempt; keep working.
Programming / Re: I Can Code In 75 Languages!!! by Craigston: 11:15pm On Jul 15, 2016
tr3y:


Syntax Error Expected expression got wink
Shhhhh... Let's leave it there just to annoy the other developers.
Btw that's not my error. Nairaland misinterpreted it as an emoticon (I wonder which one) and wouldn't display the closing parentheses. I had to edit it to Python 2 style. Bug fixed.
Programming / Re: I Can Code In 75 Languages!!! by Craigston: 11:14pm On Jul 15, 2016
DanielTheGeek:


It's a discussion forum for developers, designers and content makers...you could share a story about a bug you faced for months, or talk about the latest on programming languages, domains e.t.c It's very new, hope you join tho
Registered.
Programming / Re: I Can Code In 75 Languages!!! by Craigston: 3:45pm On Jul 15, 2016
DanielTheGeek:
This is my last post on this thread and I hope you're hearing me loud and clear..
It is better to know just one language and come out with 75 working end products, than to know 75 Languages and have no selling product of your own or open source projects
Sit down and ask yourself, I'm i really a programmer or a mouthgrammer (Mouth programmer: someone that codes only by talking about the code)?
Even me self have started working towards a forum/social platform for devs like uncle DHTML and aunt Booyakasha... Friendosphere
I like what I see there. How can beginners like me contribute to the community there? You know it doesn't feel good being what torrent users call the leech (the guy that benefits without contributing).

Solmax:

Your best Languages are
Php
JavaScript
Python
Got it without running the code, I can't really program well but am sure good in reading code.
Then we have something in common: I'm not good at writing programs but I'm patient when reading programs and I figured it out from the objects he created.
Well, I'm not even good at reading programs because I've not had to debug very large programs (and reading code and keeping track of context will be very important in such a task despite having debuggers). So let me console myself by printing "Hello World!" to the screen (at least it's a start.
print "Hello World!"

1 Like

Programming / Re: Why PHP Should Not Be Your Primary Language by Craigston: 6:16pm On Jul 12, 2016
It's nice to see some language wars again. Keep it up.
BTW it seems everyone loves PHP because they always find a reason to talk about it.
There are more languages that we can learn. And the author is right on some things: PHP shouldn't be the only thing in your arsenal if you're thinking of getting hired. And you cannot do everything with it.
But PHP is open to contributions so if you feel something is missing, give back to the community by creating it yourself. Good job if you can bring the PHP ease of use to desktop application development and or system administration.
*Just posting too. It's not nice to stay quiet even though you're a noob*
Phones / Re: Why Would Our Network Providers Deceive Nigerians With Their Fake Data Plans by Craigston: 3:19am On May 24, 2016
MTN is now officially a culprit in the data zapping crime. Here is the result of a test I carried out to confirm the scam.
I subscribed for the 25-naira, 500MB night data plan on MTN Pulse. I used less than 300MB and MTN cut me off. See the screen shots attached.
1. Error screen shot from the browser with MTN telling me "Oops! You've run out of data".
2. Screen shot from Network tool showing I used less than 300MB.
Hail the new criminals.

1 Share

Science/Technology / Re: Team Of Experts Predicts What The World Will Look Like In 2116. by Craigston: 9:40am On Apr 17, 2016
cogbuagu:
I don't know what the world will look like in year 2111 but what I know is that the older the world get the short life sperm will reduce. That is no human will be able to live above 70 them. 2000 BC people live up to 200 years.
That's apparent longevity, not actual lifespan. King David accepted 70 as the average lifespan of man; that was so many years BC. And today, it's still the same. Have you really studied the generations you feel so envious of?

Concerning the topic, I think a healthy level of optimism is good, but not too much. There's so much that can go wrong that we can't be too sure, or even very sure, and I like the uncertainty.

Brave New World, huh? Maybe Aldous Huxley was correct; maybe he was wrong. Maybe Isaac Asimov was just dreamy; maybe he was actually prophetic. Whatever be our lot, history will be made, or repeated, or will reach its end regarding humans.
Programming / Re: JS Script Not Working(for_in Loop) by Craigston: 12:40pm On Apr 11, 2016
proxy20:

i need a value
I = 1
Is that a different behavior in JS? In each nth iteration, i is a variable equivalent to Players_Name[n]. So in every iteration, the program outputs Players_Name[Players_Name[n]] instead of Players_Name[n].
Programming / Re: JS Script Not Working(for_in Loop) by Craigston: 10:39am On Apr 11, 2016
melodyafsana:
What's the problem with this js script? My browser doesn't working by it or going crashed or showing page unresponsive.
please check it & let me inform. Thanks in advance!
<script language="JavaScript">
var Players_Name=new Array()
Players_Name[0]= "L Messi"
Players_Name[1]= "Neymar"
Players_Name[2]= "C Ronaldo"
Players_Name[3]= "Suarez"
Players_Name[4]= "Higuean"
Players_Name[5]= "Kaka"

for(var i in Players_Name);
{
document.write{"The Players are :"+Players_Name[i]+"<br>"};
}
'i' is not an array index so Players_Name[i] is undefined.

Edit:

I got it wrong there.
i is actually an array index.
This works:

<script language="JavaScript">
var Players_Name=new Array()
Players_Name[0]= "L Messi"
Players_Name[1]= "Neymar"
Players_Name[2]= "C Ronaldo"
Players_Name[3]= "Suarez"
Players_Name[4]= "Higuean"
Players_Name[5]= "Kaka"

for(i in Players_Name)
{
document.write("The Players are: " + Players_Name[i] + "<br />" );
}

1 Like

Programming / Re: How Not To Learn Programming by Craigston: 9:56pm On Apr 10, 2016
I have read thy words, your codeness, and they are true! wink
May I add this for those of us in our undergraduate years now. I contributed this, a few minutes ago, to stream of advice to someone finding
his way into the programming world and it can be helpful here.

Good advice has been given and I've taken them for myself too.
You should take care to not get distracted by 'just becoming a good programmer'. Many of my course mates have that mindset and I can see the danger in it already. I've not seen a good number of them who are interested in other disciplines like Physics, Mathematics, Statistics, Psychology, Arts (any form of art can add value to you), Geography (at least the basics), Philosophy and others. All of those are not too necessary or even compulsory but you get more value anyway.
Most innovations come about through the interaction of necessities in various fields. Technology alone is useless if it doesn't solve problems and having a wider breadth of knowledge opens you to many problems you can solve in many ways.
If you don't get good at your theories, your Math and other related disciplines, it may become a speed breaker to your progress. When you get higher, you'll have to take courses that require you to know more than programming in any particular language.
Also care about your social skills, build healthy relationships with peers and with your teachers; you'll find their recommendation useful sometime later, if not soon.
Happy learning.




When you're about going low-level in development, take some time to learn about using virtual environments and containers. It can save you much pain when a bug would have messed up your system. With Virtual Environments, you can take screen shots of your system state and ease backup processes. And you can easily recover from disasters.
Career / Re: Myths And Reality About Being A Manager by Craigston: 7:30am On Apr 10, 2016
True claims OP. Stereotypes about management can form a manual for management as dense as a whole management course.

Myth: Managers are the most important persons in an organization and are the most powerful.
Reality: Every employee is important (the manager is also an employee) and in ideal (or even regular) conditions, they have only authority, not power, over their units, and such authority is for the efficient and optimal functioning of their units.

2 Likes

Programming / Re: .NET Vs Python For Cryptography And Cybersecurity by Craigston: 11:16pm On Apr 09, 2016
I don't know which is better but it seems .NET framework is now opensource. You can check it out.
Phones / Re: NTEL: Check Out The "Fair Usage Policy" by Craigston: 3:51pm On Apr 09, 2016
4C2215131:


Methinks they are just trying desperately hard to cash in via their pseudo-monopoly like you mentioned before other players get in the game.
These TELCOS need to be regulated even more. You just can't be satisfied using one. You'll likely use at least two for purposes one could serve. But it's the choice that's helped us escape some checkmate.
I hope they won't serve us compulsory caller-tunes service too.
Phones / Re: NTEL: Check Out The "Fair Usage Policy" by Craigston: 6:33am On Apr 09, 2016
I've been wary of their Terms, Conditions and Policies since they started their media parade. But they aren't much different from what we get now, except for these twists and some others.
On this thread (NTEL number reservation...), I had some reservations about some clauses I find sinister. And now this?
Their idea of what is 'reasonably expected of a private individual' is ridiculous at best. It's a whole new dimension of ridicule of loyal customers. It's as good as saying "hey idiots, we run this business and you cannot get 4G LTE service elsewhere (at least not now) so you MUST do as we say!"
The clauses read familiar with me and I think they're acting with reasons, although the actions are misdirected.
First, there's no reasonable ceiling on a private individual's data consumption. Certain conditions and requirements can push those limits. Suddenly, their well-intentioned policy hurt innocent customers.
For example, a sudden system upgrade (maybe a distro-upgrade) can require downloads in the neighborhood of 2GB or even more. Add regular usage and your daily cap is reached (and all-loving NTEL tortures you with the infamous 512bps).
What about a large download, from a file server that doesn't support resumed downloads, failing for reasons you couldn't avoid, and you have to resume the download?
What about large software like Visual Studio which can be downloaded legitimately from Microsoft's website (over 10GB of files)? Do I need to split it over days?
Really, this policy sucks!

Their commitment to control data usage is not unconnected to current international policies against pirates (no, good users) and piracy (no, community spirit). As noted in her book 'Internet Book Piracy', Gini Graham Scott does not prefer techniques of curtailing piracy that end up hurting legitimate users. Neither do I. Their rage against Bittorrent and other file sharing services is misdirected. Even organizations like Canonical prefer P2P connections due to the speed gains and reduced costs.
Telling us how intolerant of P2P connections they are is a bold hint that they'll be sniffing on your data, possibly looking at exactly what's inside your packets (like the mail man reading your letters and deciding whether you should receive each one or not). And what stops them? Our constitution is weak on that side.

We have our choice anyway (until the other corporations turn wolves and pierce those same unmerciful paws in our digital hearts). We can either choose or let them choose for us. But, if we follow them under these clauses, someone will definitely get bitten soon---by these same clauses. And they're just starting. I wonder how many more they'll add as the calf grows into a bull.

14 Likes 1 Share

Webmasters / Re: A Typical Nigerian Blogging Experience by Craigston: 10:51pm On Apr 08, 2016
Just when they start earning a little more on Adsense, another round of privacy concerns fill the news and more users install ad-blockers. Perfect!
Programming / Re: If Programming Languages Were Countries. by Craigston: 8:36pm On Apr 06, 2016
Knownpal:
All these programming languages like FORTRAN, BASIC SHELL, were once useful and still do in some aspects. Is it that Nigeria is now obsolete?
Yes. With many legacy projects (like Ajaokuta Steel Plant and many others) written in it. Maybe it's struggling back like Fortran90/95, but how successful can it be? Even it's loyals doubt its future.
China - Perl, is moving on and has improved recently (Perl 6) with exciting possibilities for those that love mystery.
Culture / Re: Benin Bronze Cockerel Causing Debate Between England & Nigeria (PHOTO) by Craigston: 11:26pm On Apr 02, 2016
That's one of the many relics of the crimes and sins committed against Africa, and the denial of Africa's potential and humanity.
Programming / Re: Help In Updating And Upgrading Debian Gnu/linux 7.0_kali_ by Craigston: 7:14am On Apr 02, 2016
wisemania:


1.0 Kali tty3

regular os

was going to add it to the sources.list file but the file isnt a writable one.
haven't installed any external app since i installed it...
Kali 1.0 is too old. Even Kali 2.0 is getting old too.
I wouldn't recommend using Kali Linux as a regular OS. Isn't it telling that the regular office applications and other utilities and applications for regular users aren't installed by default? The makers of Kali Linux, Offensive Security, clearly acknowledged this. The following notes are from the Kali website:


Kali Linux is specifically tailored to the
needs of penetration testing
professionals, and therefore all
documentation on this site assumes
prior knowledge of, and familiarity with,
the Linux operating system in general. Please see
Should I Use Kali Linux? for
more details on what make Kali unique.


Is Kali Linux Right For You?
As the distribution’s developers, you
might expect us to recommend that
everyone should be using Kali Linux. The
fact of the matter is, however, that Kali
is a Linux distribution specifically geared
towards professional penetration testers
and security specialists, and given its
unique nature, it is NOT a
recommended distribution if you’re
unfamiliar with Linux or are looking for
a general-purpose Linux desktop
distribution for development, web
design, gaming, etc.

While Kali Linux is architected to be
highly customizable, don’t expect to be
able to add random unrelated packages
and repositories that are “out of band”
of the regular Kali software sources and
have it Just Work. In particular, there is
absolutely no support whatsoever for
the apt-add-repository command,
LaunchPad, or PPAs. Trying to install
Steam on your Kali Linux desktop is an
experiment that will not end well. Even
getting a package as mainstream as
NodeJS onto a Kali Linux installation can
take a little extra effort and tinkering.
If you are unfamiliar with Linux
generally, if you do not have at least a
basic level of competence in
administering a system, if you are
looking for a Linux distribution to use as
a learning tool to get to know your way
around Linux, or if you want a distro
that you can use as a general purpose
desktop installation, Kali Linux is
probably not what you are looking for.

So that's a pointer, I think. If you still have need of it, just download the latest release, backup your data and install the latest release.
Programming / Re: Help In Updating And Upgrading Debian Gnu/linux 7.0_kali_ by Craigston: 7:47pm On Apr 01, 2016
What version of Kali is it? Are you using it as a regular OS or for pentesting? Did you add external repositories or install regular apps on it?
Politics / Re: No Light, No Fuel: When Will This Suffering End? (photo) by Craigston: 3:44pm On Mar 31, 2016
dulux07:
The govt is aware already. No need to broadcast.
Funny enough, while this govt is trying hard to achieve something close to this, it is still some useless nigerians who go ahead to vandalize gas pipelines.
That's one of the reasons we should embrace nuclear energy. Which tout will boldly try to vandalize a nuclear facility (unless he's a suicide bomber)?
Nuclear energy is cheaper in the long run. It's safer for the environment. Even after occasional disasters, it cleans itself up, unlike what greenhouse emissions turn the planet into.
Programming / Re: How To Hire Good Programmers In Nigeria (an Experience Based Article) by Craigston: 8:00pm On Mar 16, 2016
Congratulations! You have just helped some persons stay unemployed for longer.
Well, I'm not a programmer, so to speak, but I have an interest in learning and these guidelines will help direct my learning. Thanks for sharing them.

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (of 27 pages)

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