I wanted to learn Angular 2 but Typescript. Sure, we can work on Angular 2 with Javascript but since Angular 2 designed with Typescript in mind, therefore most documentation was written with Typescript.
What's your opinion about TypeScript? I really don't like it. Another Java wanna be sits on top of wanna be Java (JS in this case).
I never actually tried ts, mainly because I didn't like how it looked lol. But I love using babel. Almost same thing with Angular 2. I was going to start studying it, then I saw react and instantly loved jsx. Just felt more natural to write apps with babel + jsx for me since I've been doing a lot of plain js.
Some people don't like the dynamic type but I prefer dynamic type. It is more flexible when writes code.
we can assign any type we want to a variable, and change the type of a variable by assigning new type.
The world of web applications today is like a cup coffee with different flavors but still a coffee. Nothing new, nothing innovative, just slightly different ways of solving a problem by adding more learning curve.
Similarly, Java is no more OOP, it is now trying to be like JavaScript by adding functional paradigm to the language in a weird way.
This may be a little off topic, but if we are doing code talk...
I don't know what any of that is, because I'm a personal homepage web designer and not a programmer. I've never compiled one script.
I don't know what the javascript functional paradigm is, but it reminds me that I want to do some window cool stuff in my game with jQuery now that I know RMMV is basically Chrome and there really is no wrapper containing the javascript. It can reach outside the game, move html elements around, make ajax requests, change canvas attributes, and the online manual for jQuery is extensive and easy as heck like PHP.
I tried to learn the Pixi library that's in RMMV to do some image stuff and it's cryptic as heck. I can't even follow one beginner tutorial. I googled one day for hours and I couldn't understand any of it. Node js I kinda get, but I just learned that my node fs thing won't work in browsers.
That's something I'd probably write the app in PHP because that's the only real language I know that can process files and graphics + I have paid hosting with cPanel and stuff.
I have not done any RMMV plugged, I just quick looked at Pixi library, it is not really too complicate, it is just a library dealing with the graphic. There are libraries take years to get solid understanding. It's all about time, if you commit in learning something, spend more time on it then you will understand it.
JS function is just a block of code passing around, which you write a lot when code JS. eg.
function myfunc () {};
Java did not have it till Java 8 and they called it Lambda expression. That's all.
Yeah, but I'm literally (not just technically) clinically mentally disabled so I need a w3schools.com or an api.jquery.com or a php.net. PIXI just blows my mind why they write 1000 lines to bury a simple usage of getImageContext("2d") into something weird and cryptic like textures and bitmaps.
I honestly didn't know that my game was all HTML until recently (I mean I knew HTML5 and all that, but like moving <elements> I mean) and I could alter it with CSS and stuff.
Nah, you're fine. I was born with mentally stupid and slow. I get bullied a lot, but now I am the person 10x better than those guys who bullied me, an engineer work for defense and intelligent agency.
Normally, the human able to utilize about 40% of their brain power. Brain power is same as human' muscles, you need to keep training it which will then increase the power of your brain over time. Every gold Olympics athlete needs a lot of training to get to the level of they are now.
You just keep consistently spending more time on reading, practicing, researching, observing the subject you want to understand then to one point of time you will able to understand it. If it is too hard for you properly because you don't understand the smaller parts or the dependencies of it, so break it down and learn the basic, the smaller parts, the dependencies.
E.g. function myName() { var me = "Yeah Me!" };
For a non-programmer wanted to learn JS, that person would ask himself something like this what is that whole thing? its JS function. What is the function keyword does? what is myName()? what is {? what is var? what is me? what is =? ...etc. once you already understood all the pieces, you will understand the whole thing.
That's it, it is all about how consistently, commitment, and how your brain power at current stage right now. Some people are lucky born with high brain power, some don't ( in this case I was born with mentally stupid ), if they don't keep it healthy they will lose that give power.
Just my 2 cents.
So, are you currently working as front-end web developer or web designer? Once you learned Typescript syntax tell me what is your opinion. I don't like it. Type data is nice but that destroys the flexibility of dynamic typing.
I'm just a personal web designer (not developer). The extent of my abilities is basically Tumblr and Wordpress themes.
Looking at the first page of typescriptlang.org/docs it seems like regular javascript at first glance, but then besides declaring functions there is like class and interface. That's just an innocent looking tutorial, but my gut tells me it can become a whole lot of spaghetti real fast.
I don't really understand what a class is in javascript, except RPG Maker MV is making me take a crash course. There are a few times I've tried to console log an object that turns out a static class and it's just a function that makes an error message as far as logging it is concerned. It seems classes have to be declared with "new" each time. If new is used to set a class, I've used classes without knowing it, like new Date() and new RegExp() and stuff, though I may be wrong.
new does not use to set a class, it is used to invoke the constructor of the class which returns an instance of that class.
When you invoke new Date(), you invoked the constructor of that class which returns an instance of Date object.
Class is a keyword uses to define custom object.
E.g: ES5 you create an object like this
function MogWai() {
this.hp = 100;
this.mp = 100;
}
ES6
class MogWai{
constructor(){
this.hp = 100;
this.mp = 100;
}
}
Basically, what class does is to eliminate boilerplate produces by prototype when writing similar code.
In ES5 when you want to share methods or properties to other objects. You may write something like this
function MogWai() {}
MogWai.prototype.name = "MogWai";
MogWai.prototype.say = function() {alert(this.name);};
var obj = new MogWai();
obj.say();
ES6 you achieve the same thing with class
class MogWai {
constructor() {}
say() { alert('MogWai'); }
}
class MogWai2 extends MogWai {
}
var obj = new MogWai2();
obj.say();
Interface is how you enforce the rule to the class which implements that interface. ES6 does not support interface only Typescript does.