₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,331,159 members, 8,448,907 topics. Date: Tuesday, 21 July 2026 at 04:30 AM

Toggle theme

Micodon's Posts

Nairaland ForumMicodon's ProfileMicodon's Posts

1 2 3 4 5 6 7 8 ... 11 12 13 14 15 16 17 18 19 (of 20 pages)

ProgrammingRe: Javascript With NodeJS by micodon(m): 12:38pm On May 02, 2015
Febup:
The code you posted relates to a scope so its not far from Closure which C# supports. But why would I need to access a value in conditional statement from outside of it, I have never had the need to do so.
Are you sure you do program? Why wouldnt you need access to a value in a conditional statement?

Let me give you a simple example.

Imagine that you have to display the name "guest" for users that are not logged in OR the user name for logged in users. Here's a code snippet using laravel


<?php
if (Auth::check()){
$name = Auth::user()->name;
} else {
$name = "Guest";
}

echo "Welcome " . $name;
?>


OR

<?php
$name = "Guest";

if (Auth::check()) {
$name = Auth::user()->name;
}

echo $name;
?>


you cant tell me that you write codes and you ve not had the need to access a value in a conditional statement from outside it
ProgrammingRe: Javascript With NodeJS by micodon(m): 12:25pm On May 02, 2015
Febup:
The code you posted relates to a scope so its not far from Closure which C# supports. But why would I need to access a value in conditional statement from outside of it, I have never had the need to do so.

C++ cannot handle dll hell, but you don't have this issue in C#.
Memory leak is very common in C++ applications but you don't get that in C# applications.
C++ does not support reflection but C# does by allowing you to declare objects at run-time and not just at design time.

C# supports rapid application development for business applications and it does the job well, without having to worry about dll hell or memory leak like you do in C++. When it comes to developing a system then using C++ would be the prefer choice.
Bros, where do you get ur infos from?

1. Scope has to do with accessibility of variables, objects, functions etc. Virtually every line of code you write has a scope. The code above, is not in anyway related to a closure. It is a conditional statement
ProgrammingRe: Javascript With NodeJS by micodon(m): 11:11am On May 02, 2015
Febup:
Got an error, see below. Were you trying to demonstrate closure in C#?

Error: A local variable named 'age' cannot be declared in this scope because it would give a different meaning to 'age', which is already used in a 'child' scope to denote something else
1. that is not a closure. Its not even close to a closure.

2. i was just trying to show you how Microsoft were desperate to replace C++ with a modern language that they overthought, and made unforgivable design flaws

Why the heck cant one declare a variable in a conditional block and access it outside?

NB: The above is not a microsoft mistake in C#. its the way C# was designed.
ProgrammingRe: Javascript With NodeJS by micodon(m): 9:02pm On May 01, 2015
abubaka101:
It's good to note that all the tension and brawl that existed here up till page 3 is gone.
But I've got a question. You guys are raising some very high level talks here that is so rare or hardly talked about.
It's definitely not the usual web devt talk elsewhere, where words/concepts are substituted with code. Rather, you guys are talking more concepts than code.
How can one knw these concepts? Because the truth is, I learnt all I knw on my own, nw I do ASP.NET C#. But nowhere in my tutorial was speed, or resource efficency or memory management even talked about.
So how do I know these concepts to make my programming more efficient?
As Pcguru1 has stated, When you want to build an app, you would want to find the best architecture for the job. Both out of experience and research.

So, if i want to build something like a social network, i break down the requirements like so

1. Concurrency
2. File Sharing
3. Server sharding and data replication
4. Event driven (SSE, PubSub, etc)

So whats the best possible software stack and hardware architecture that will solve these issues without been intrusive and hard to work with.

When i dont know, i go to the web and see what others have done.

As we are all learning, Stackoverflow, quora and Highscalabilty are some of the best sites i visit.

in a nutshell, a breakdown of the requirements is a first step. Research is more or less second.
ProgrammingRe: Javascript With NodeJS by micodon(m): 11:52am On May 01, 2015
pcguru1:
The guy is a Senior Architecture so his job is always about Tech that scale and doesn't crash the server, He's a Java person as in he's f.cuking good but he says go is it for him anytime. anyway sha my eyes are on it and it's no single thread like Node which is good.

meanwhile if you are on Linux you should try geeting VScode Microsoft editor for Linux downloading it now for TypeScript as WebStorm support for TS is just there.
Yea, i use Ubuntu. Will check it out. Thanks man
ProgrammingRe: Javascript With NodeJS by micodon(m): 10:38am On May 01, 2015
pcguru1:
Yesterday a fellow colleague showed me something that blew my mind as in mega brain blown. We have a Java App that handles real time logging and stuff and the app consumes a lot of memory almost a 1gb the equivalent in go had a memory footprint of 1mb or even less. He said the JVM might be the culprit.
I was just reading about go this morning. Mehn....its too good. a beauty of it is that you can use it both on server side and client side with gopher js.

and its tutorial is about 40pages. We might have a king after all
ProgrammingRe: Javascript With NodeJS by micodon(m):
Febup:
It would be insane for Microsoft to rewrite their existing applications from scratch in a new language with C#.
How long do u think it will take them to write Microsoft Office from the scratch? 10years?

A few years ago, a microsoft tech said on quora that the reason why they still use c++ is because of unmanaged memory. they manually manage memory of their apps based on the system resources. but c# will do it the same way everywhere.

Microsoft started developing its new Spartan browser from scratch last year. i dont know in what language, but i do know that the rendering engine is built with C++.

Bro, microsoft knows. Efficiency, Performance, less use of resources, C++ is boss
ProgrammingRe: Javascript With NodeJS by micodon(m): 10:53pm On Apr 30, 2015
Visual studio written in C++ and C#

Microsoft office apps written in C++.

does this tell you that c# can do wat c++ can do?

Again, i admonish you to desist from just believing what you read from the net without trying it urself (at least where possible)
ProgrammingRe: Javascript With NodeJS by micodon(m): 10:45pm On Apr 30, 2015
Febup:
Microsoft says "Interop enables C# programs to do almost anything that a native C++ application can do. C# even supports pointers and the concept of unsafe code for those cases in which direct memory access is absolutely critical."Source: https://msdn.microsoft.com/en-us/library/z1zx9t92.aspx

But you say it cannot ok we need Microsoft to join us here to sort this out.
you see? why wouldnt microsoft hype their product?

If C# can do what c++ can do, why is C++ used in writing windows. Hell, the windows kernel is written in C.

If c# can do it, Why didnt they use it to write the entire windows? their own creation.

Dude, dont just believe microsoft. theyre liars
ProgrammingRe: Javascript With NodeJS by micodon(m): 10:25pm On Apr 30, 2015
Febup:
C# too gives you direct access to your computer memory if you need to do so, by using unmanaged code, take a look below, this is coming from Microsoft.

"Interop enables C# programs to do almost anything that a native C++ application can do. C# even supports pointers and the concept of unsafe code for those cases in which direct memory access is absolutely critical."
Source: https://msdn.microsoft.com/en-us/library/z1zx9t92.aspx
1. Memory access is different from memory management. all languages gives u certain access to memory.

2. the sham microsoft calls pointers are not true pointers. Disagree? try adding 2 pointers in c#.

3. What microsoft calls pointers are limited to value types and arrays.

4. what microsoft calls pointers, can only point to unmanaged types.

5. To use what microsoft calls pointers in c#, you need to be in an unsafe context (which by the way, is very much discouraged by Microsoft). This means that the code cannot be verified, and must be run from a trusted source. the implication? you cannot use pointers in apps that use the network. which app doesnt?

Need i go on? do more research, bro
ProgrammingRe: Javascript With NodeJS by micodon(m): 8:59am On Apr 30, 2015
if (true) { int age = 30; }
int age = 35;


Please run the code above in C# and report your findings
ProgrammingRe: Javascript With NodeJS by micodon(m):
Febup:
I was only comparing a scripting language with a programming language. The line between them are getting closer now, as a scripting language like JavaScript can now be compiled to machine code instead of being interpreted when it's just being used as a script.

In conclusion C# and Common Lisp should be crowned the king of programming languages, as they are the only two languages that are both: Imperative, Object-Oriented, Functional, Procedural, Generic, Reflective, Event-Driven as well as having other paradigms.
1. All languages must be compiled change to machine code. ALL. Scripting languages like javascript are interpreted (thats why they are called scripts. they are read and interpreted) JavaScript falls into this category. Others are compiled once and for all.

2. A scripting language can also be a programming language. PHP, JavaScript, Python, Perl, etc are all scripting languages. They are programming languages too.

For emphasis,

They are called Scripting languages not because they aint programming languages but because they are interpreted at runtime.


In truth, You cant crown any language King. Some are good for some apps and bad for other apps

Pay attention to the following

Concurrency: GoLang, Erlang, Scala, Node, etc
High Performance: C, C++
Memory Management: Java, C#, etc
Ease of Use: Python, PHP

so, will i write a 3D game in C# when i know C++? WHY ON EARTH WOULD I DO THAT?

Thats just a rough draft. Thats y i'll advise any programmer to learn at least one in each category.

NB: if i was asked to pick one out of the above, it'll definitely be C++. i mean, when i can manage my memory myself...Access registers...pointershuh?
ProgrammingRe: Javascript With NodeJS by micodon(m): 8:40am On Apr 30, 2015
pcguru1:
it would be good to see some cheap Nodejs hosting, I will wait for PHP7 and then compare them and see which can handle Real time connections and the amount of resources used. However Nodejs single thread would obviously use less. I have some ideas with Real time apps sadly laziness.
You dont have to wait, bro. PHP with HHVM is already a killer. It destroys node completely in servers with more than one core. Because node is single-threaded, it can only use one core. Imagine, having a server with 8 cores, but you are only able to use one. i did a hack in my node app to get around this, tho'.

Out of the box, HHVM will use as many cores that are available. So which do you think is better for high concurrency?

You can also check PHPng
ProgrammingRe: Javascript With NodeJS by micodon(m): 2:19am On Apr 29, 2015
Febup:
I feel it is now a gray area as to whether a script today is a full programming language or not, this is because these scripts have been evolving over decades now and have grown far beyond what they were originally designed for.
I use JavaScript to write life critical applications and then use AJAX to link to C# in the middle layer to connect to the back -end database. Now with Node.JS I can do without C# and get to the back-end database with just JavaScript, so this was why I came up with the opinion that JavaScript is now a full programming language, though others may disagree.
What is a programming language?
ProgrammingRe: Javascript With NodeJS by micodon(m): 10:02pm On Apr 28, 2015
Whether JavaScript is a programming language or not is still under debate even by the very eхperts.

What im 100% sure of is: if javascript wasnt a programming language prior to the birth of node, then Node doesnt make it a programming language. Node never changed the how Javascript runs. It only changed where it runs.

and FYI, Node aint the first to do this.

Quite easy for programmers to understand. it aint about the language. Programming paradigms are virtually same even though syntax may differ
ProgrammingRe: Javascript With NodeJS by micodon(m): 9:15pm On Apr 28, 2015
Febup:
I'm a solution developer which is higher than a coder. I use the best tool that gets the job done.

I have not attempted to write a programming language before, but I give credit to the people who have created these languages and scripts we are using toady. All I'm concern with is to use a language or a script that gets the job done. This is what programming concept or programming paradigms is all about, how you go about solving a problem and using the right tool for the job. You don't use C, C++, Java etc for a job that JavaScript can take care of better, best to keep it simple, so there is no need to crack a nut with a sledge hammer in programming.

If you want to start another war on programming concept or programming paradigms then take a look at this diagram first.
Source: https://www.info.ucl.ac.be/~pvr/VanRoyChapter.pdf
One reason why node wont be no 1. the right tool for the right job.

2. writing a programming language is not rocket science.
ProgrammingRe: Javascript With NodeJS by micodon(m): 7:35pm On Apr 28, 2015
Febup:
What makes you feel that this forum is only for people on you street or your town and what makes you feel that 100K to the person you have been running your mouth with is not pocket money he gives to others. Boy you need to learn how to respect other you can disagree with other people's opinion, but learn to do it with maturity not like an unruly kid you have displayed here so far.

You sound like a student at uni, but you don't know if the person you have been running your mouth with is the guy that will interview you for a top notch job after you finish uni, but from arrogance the you have displayed so far, you have shown that you can not work with other programmers in an office, so my advice for you is to learn to be polite to others and to be mature in the way you disagree with others.
if it pleases you to know, i graduated from the prestigious Federal University of Technology, Owerri 5years ago.

2. You dont demand respect. You earn it.
3. I own my firm.
4. You are not a coder
ProgrammingRe: Javascript With NodeJS by micodon(m): 10:45pm On Apr 27, 2015
pcguru1:
There's also https://babeljs.io/ however am a Dojotoolkit Fan boy and if Dojotoolkit says TypeScript then its TypeScript for me. As Dojo is the only JS Framework i can say suits me.
I used Dojo for a now defunct app. Somehow i dont like fetching resources when needed. i know im the only person in the world that doesnt like this. Made me switch to. YUI, then to Closure Library. Closure compiler compiles dependencies and does code optimization optimization. Theres also Closure templates
ProgrammingRe: Javascript With NodeJS by micodon(m): 10:30pm On Apr 27, 2015
pcguru1:
Nope not that i know of (though never used Closure Compiler before directly) Typescript only gives you what you put in, however you can use "Gulp" to watch your file and minify. Sadly i haven't been opportuned to work with TS, as Angular is what i use at work and it's only Angular 2.0 using TS. But TS is actually good and gives you Static Typing which is why am gunning for it, am tired of JavaScript's loose typing and unforeseeable errors.
oh! ok. I saw some code samples. saw something like the use of interfaces in a script. that's bold. ill give TS a try.
ProgrammingRe: Javascript With NodeJS by micodon(m): 10:15pm On Apr 27, 2015
pcguru1:
Wow I promised not to respond but this just shocking. A language doesn't have to be server side to be defined as a programming language o. And JavaScript are only called scripts because they don't compile like Java/c++/ csharp. Febup I really have nothing against you but my advice is please don't take this as a personal vendetta people are reading this and might judge you wrongly. You really need to update your knowledge on this things. This is what we look out for when we employ. This is really disturbing. cry
Really disturbing.

Meanwhile, i had a look at Typescript. Looks clean. but, does the compiler do code optimization like the closure compiler?
ProgrammingRe: Javascript With NodeJS by micodon(m): 9:53pm On Apr 27, 2015
Perl - Script
PHP - Script
RoR - Script
Python - Script


and they are server-side.

Throw the next line of ignorance, dude. waiting
ProgrammingRe: Javascript With NodeJS by micodon(m): 9:51pm On Apr 27, 2015
Febup:
Your question shows how senseless you are.

Before you cannot write a server-side application with just JavaScript, that's why it was called a script, which means it was not a full programming language, but now JavaScript can be used on the server-side as well.
Hehehehehe. So JavaScript apps are called scripts because they are client side? Excuse me..why are PHP and Python scripts called 'Script'?.

Hello World, he doesnt even know what a script is.
I'm enjoying this
ProgrammingRe: Javascript With NodeJS by micodon(m): 8:37pm On Apr 27, 2015
Febup:
^^^
You are a BIG FOOL
Hehehehehe......Let the world decide that.
ProgrammingRe: Javascript With NodeJS by micodon(m): 8:31pm On Apr 27, 2015
Febup:
^^^^
Just admit this completion is more than the hello world application you are used to writing and that you have no clue as to how to go about it. I'm right in saying that JavaScript is now a full programming language as it was only on the client-side before, now it can be used on the server-side.
1. Your brain is too empty. So, Programming is server side, abi?

2. Ayo game, also known as wari in some parts of west africa --- Source code (Clojure) https://github.com/ericlavigne/island-wari/

Dude, you make me laugh. ill continue here with you for as long as possible.. Just to show the world the largest vacuum in Nigeria
ProgrammingRe: Javascript With NodeJS by micodon(m): 7:27pm On Apr 27, 2015
Febup:
If you are brave enough then lets do it here. I have already searched the web and there is no source code for this game on the the web.
i see how narrow minded you are. which is braver? my coming to ur place of choice to do this or doing it online (where i can easily pay Paul allen to do and gimmie the source or search the web)? The whole world is watching your silly self. You aint a coder. You aint. All your Posts have shown it.

Not surprised. The topic of this thread was once: "Javascript is now a full programming language" (cos of node)
ProgrammingRe: Javascript With NodeJS by micodon(m): 11:44am On Apr 27, 2015
Febup:
^^^
I'm not surprised you have chickened out of this programming competition. It will do you good to stick to writing your "hello world" applications.
ill give you 100K if you beat me. you ll give me same amount if i beat u. its quite simple. we meet and do this. do not hide behind the shadows of the net and start running your mouth. if you are good, fix a location. Anyone can just search the net and download source codes and paste here.
ProgrammingRe: Javascript With NodeJS by micodon(m): 6:58pm On Apr 26, 2015
Febup:
There is no ready made code for this game on Google so no excuse for you. We should do it here in the open for others to see. I don't own Node.JS so there is no offence if I Google for information about Node.JS
Bros, i want us to do this face to face. ill rearrange my timetable to do this. your call. butterfly calls itself a bird
ProgrammingRe: Javascript With NodeJS by micodon(m): 6:33pm On Apr 26, 2015
Febup:
@ pcguru1 and micodon

The best way to settle our score here is for us to engage in a programming competition to know who is a developer among us three, I want us to go for a two player Ayo - Web or Mobile game. You can use any language of your choice. Are you in for this? Or you just want to chicken out and stick to your WordPress-only development, that requires no idea of programming concepts.
maybe you dont have work to do. i want us to do this face to face. i dont want you to go googling stuff. one office. one problem.
ProgrammingRe: Javascript With NodeJS by micodon(m): 7:47am On Apr 26, 2015
pcguru1:
as far as am concerned he's not a developer so that last word bot is my last reply to him. nothing he says or talks about are his own words and clearly has no experience in Nodejs because he has no idea about what he's talking about besides work plenty my table sef embarassed
it's not just about node. he talks like he has no idea of programming concepts at all. probably one of these WordPress-only guys
ProgrammingRe: Javascript With NodeJS by micodon(m): 12:07am On Apr 26, 2015
micodon:
When you know how to programme, you'll understand. keep showcasing urself, dude.
Bros, this aint for u. sorry
ProgrammingRe: Javascript With NodeJS by micodon(m): 12:05am On Apr 26, 2015
Febup:
For you guys criticising Node.JS, well the fear of Node.JS is the beginning of wisdom as it is matching forward and taking programming territories, including the territories you've been comfortable with using other languages.
i have written apps in python, Php, The .NETs, Ruby on Rails and NodeJs. so what are you saying. its about using the right tools for the job. Node's strength is in concurrency. But then, there re kings in that area like Erlang, Scala, and the almighty go-lang. when nodejs becomes the defacto choice for the web, call me
ProgrammingRe: Javascript With NodeJS by micodon(m): 11:59pm On Apr 25, 2015
Febup:
NodeJS is a runtime environment, which you program with JavaScript. A runtime environment sits on an operating system. Node.JS allows you to write your front-end back end with JavaScript and you deploy your mobile app as an IOS, Android or any other mobile app platform you have built the mobile app on.
Please tell me how you program mobile apps with Nodejs.where are the sdk's? is invoking Terminal lines via node commands programming?

1 2 3 4 5 6 7 8 ... 11 12 13 14 15 16 17 18 19 (of 20 pages)