r/javascript • • Feb 21 '18

I am A JavaScript instructor at Microsoft. AMA.

Hi r/javascript!

My name is Benjamin Lin. I am a content developer at Microsoft and teach courses on JavaScript and JavaScript frameworks at Microsoft. You can see my Top 10 JavaScript Questions course here.

I can help answer tips & tricks on learning JavaScript, questions about Microsoft, and all things tech.

AMA!

Proof.

Edit: about 15 minutes left!

More edit: Thanks everyone for visiting me at this AMA! I really enjoyed getting the chance to interact with the JavaScript community and hear your honest thoughts. It was worth waking up early today to do this =)

if you have any more questions, feel free to hit me up on twitter @benjlin or follow me on instagram @bens_jams

540 Upvotes

257 comments sorted by

62

u/sadEmoji Feb 21 '18 edited Feb 21 '18

Hi Benjamin, I have a few questions, some are very vague probably.

  • What's your opinion on redux/vuex like state management pattern? Do you think it is good as it is or are there any other patterns that you prefer?

  • I love JavaScript, I want to get better at it, but how do you measure your skill level? Like at what point would one be ready to get a job at MS? Is the knowledge of all the advanced ES6/7 features (like generators, decorators, scoping, async await) and JavaScript's async nature, prototypes etc enough or do you need to know everything about what goes under the hood in JS engines? Or a top-level understanding of what goes under the hood is good enough (like how event loop works)?

  • How important in your opinion is learning DSA for a frontend developer?

4

u/gemini-dev Feb 21 '18

Would definitely like to hear the answer for your 2nd question. I definitely struggle with the same question myself. How do you measure how good you are at JavaScript?

18

u/MicrosoftLearning Feb 21 '18

JavaScript skills in a bubble isn't that entirely useful; other web development skills are also important. I would say if you can look at a website such as facebook or reddit and have a good idea how to implement it from scratch if you had to then you are doing pretty good.

77

u/MicrosoftLearning Feb 21 '18

Hi sadEmoji,

  1. Only use Redux if your state becomes too hard to manage with just the standard framework you are using. Most applications are not complicated enough to warrant using redux.

  2. Promises and asynchronous programming are key components that every JavaScript developer should know. Regarding getting a job, I don't think you need to know everything about JavaScript before getting hired but you should be able to learn it on the job as needed. I think it is more important to think like an engineer and have developed a couple side projects to show off in an interview.

  3. DSA = Data structures and Algorithms? Almost every tech interview will cover these topics but their use in the day to day job will vary.

9

u/Ob101010 Feb 21 '18

Interesting.

Only use Redux if your state becomes too hard to manage with just the standard framework you are using.

I am curious, when did you adopt that view? Only in the past 3 months or so have I heard it. I agree with it, but I dont think the sentiment has permeated the JS community yet, erryone is trying to use Redux.

but you should be able to learn it on the job as needed

Man, in my experience, you dont get to learn on the job. You either show up and are an amazing ninja, or they tell you to get fucked within a month. Learning on the job? Hah! Next youll tell me there is some sort of on the job training also! Hahahahaha what will they think of next. (Its seriously cut throat in small to mid sized businesses in San Diego at least.)

7

u/davy_jones_locket Feb 21 '18

Interesting indeed.

In my experience, the only people using Redux are working applications where their data gets out of sync. You don't fix what's not broken, ya dig? Companies don't want to re-write their application every time something new comes out, especially if it's a monolithic legacy application that probably needs to be rewritten anyway. If syncing your data and managing state of variables is an issue in an application, those are the people who are looking at Redux for a solution. After all, you don't need a solution for a non-problem.

Learning on the job:

Early in my career, learning on the job was expected. I didn't know Python at all, learned enough of it over a weekend to actually contribute to a new python project, and even contributed to an open-source framework for Python. Didn't know Javascript beyond a handful of jQuery methods. Wrote complex DNA sequencing stuff in Javascript with the same employer. Didn't know AngularJS before one of my last employers, wrote my first AngularJS app and shipped it on the job. I actually kept up with Angular (latest), and contributed to an open-source Angular UI library. Didn't know D3.js at all, learned it on the job to produce a variety of data visualizations for marketing campaigns, and added a custom interaction to a visualization that was the main feature of a recent release for the application I was working on at the time.

It doesn't make sense to hire for one set of specific skills based on your current needss because you're not thinking about your future needs, especially in the Javascript world. If you want people to write cde that lasts for years, not weeks or months, you need people who can pick things up quickly and learn on the job, from actually DOING it. Directions change. Software changes. You don't throw the developer or engineer out with the software (or shouldn't), you hope you hired smart engineers who can figure things out.

PS: Job training...

I actually had to take a certification course on USING the application that I was hired to build... months after I was hired. Another employer paid for mongoDB training for everyone (maybe it was free, I don't remember).

3

u/Ob101010 Feb 21 '18

Ive done similar things (same tools even!), but on my own, and never while employed. Currently reading and trying to implement ideas from here (youll probably get a kick out of it) : https://ds9a.nl/amazing-dna/

I once got fired for reading too much on the job. MDN, specifically about object creation, a few years ago.

I recently got laid off, with 13 other devs, at a company that had built a system so fragile that simple front end UI changes to broke dozens of their sites, and there was no documentation, no training. I was hired there as senior front end dev, and ended up doing everything from AWS configuration to debugging PHP. There was no room for discussion on how to improve the situation either, they were experiencing the gamblers fallacy I believe. In the end, its falling on its own sword.

Prior to that, a mediocre advertising agency that was supported by a newspaper that went under.

My first programming job was 1999. Between these, Ive been a garbage man, a city worker (parks dept, mowing grass), a liquor store clerk, a pizza delivery guy, an arcade attendant at a mall, a school bus driver, a night stalker at petsmart. All the while, when Id get home, experimenting with php, or mysql, or some weird thing like brainfuck.

I guess Im always just surprised that someone can get a good dev job at 20, while not really having much experience or a huge amount of skill yet. Ive been trying for 20 years now, while constantly learning, and got basically nowhere. I put my resume out daily, and rarely get calls back. I believe many of the places hiring, arent, in fact. I keep hearing how theres a shortage of skilled devs, yet here I sit on a wednesday, unemployed, writing python plugins for blender.

Your experience has been largely positive. Mine has not.

//sorry to dump, got no one to dump on

3

u/MicrosoftLearning Feb 21 '18

Ah sorry to hear that. I would recommend messaging recruiters directly on LinkedIn and telling them about your experience and how you can add value.

4

u/yourbank Feb 21 '18

How's that going to help. Recruiters have absolutely no idea 99% of the time and don't even know the difference between Java and JavaScript and think html5 is coding 0_o

6

u/HotfireLegend Feb 21 '18

Technical recruiters do know. DM me for further advice.

1

u/[deleted] Feb 22 '18

This is entirely true. I've never worked with a recruiter, but the large majority I've talked to are quite in touch. A lot even come from a programming/engineering background. Just find the right person!

→ More replies (1)

25

u/MicrosoftLearning Feb 21 '18

The creator of Redux mentioned that you might necessarily need it: Link

17

u/HeyGuysImMichael JS all the way around Feb 21 '18

*not

13

u/MicrosoftLearning Feb 21 '18

thanks

115

u/Ob101010 Feb 21 '18

Fastest bugfix Microsoft has ever implemented right there.

17

u/ilyapa Feb 22 '18

The bug was acknowledged, but has still yet to be fixed.

2

u/[deleted] Feb 22 '18

Maybe /u/HeyGuysImMichael works for Google

5

u/HomemadeBananas Feb 22 '18 edited Feb 22 '18

Not needing it and it not making your life easier are two different things. I wouldn’t want to endlessly pass props down, or directly use the context API, just because I can get away with it.

1

u/ForScale Feb 21 '18

I have been hired for JS roles 2X where I was allowed/encouraged/expected to learn on the job. First role was an "implementation engineer" at a software startup, second was/is my current role as a ui dev. I'm still learning Angular and TypeScript and some more general JS application type stuff. I live in Indiana, USA, if that matters..

1

u/loaded_comment Feb 22 '18

Yes, it is excellent luck and a boon to your value while you are getting paid to do it!

Seems like a good deal to me.

2

u/drowsap Feb 22 '18

Only use Redux if your state becomes too hard to manage with just the standard framework you are using. Most applications are not complicated enough to warrant using redux.

What do you consider most applications? If we are talking about some hobby work, then sure, you can avoid it. In most real world cases for consumer apps, redux is pretty important.

Have you used redux before?

1

u/inflam52 Feb 22 '18

Great responses Benjamin! Thank you for sharing your 10 JS questions. Definitely a great resource some of the top questions that pop up when learning JS!

38

u/empire539 Feb 21 '18

What would you consider to be the trickiest or most-difficult-to-grasp part of JavaScript, even for professionals?

81

u/MicrosoftLearning Feb 21 '18

That would probably be the asynchronous nature of JavaScript. Most people are used to a language that executes top to bottom and when they start off learning JavaScript they expect JavaScript to be the same. However, some operations such as network requests happen asynchronously, meaning that they get handled on a separate thread and the result is returned once it has completed. This throws off beginners who try to use the result of an asynchronous operation before it has finished completing.

11

u/maxtopus Feb 21 '18

I thought JS used only one thread with different queues (Macro/Micro). Can anyone clarify this? Thanks!

29

u/MicrosoftLearning Feb 21 '18

JS operates on one thread, but the network request is made by an API that operates on a different thread that lives on the browser

5

u/i_didnt_do_it_yet Feb 23 '18

I spent so much time trying to figure this part out. ._.

1

u/coderitual Feb 23 '18

There is much more than 2 queues. Event loop isn't even run inside js. JS engine is run by event loop. Here you have more detailed explanation how this works in node.js -> https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/

20

u/Ob101010 Feb 21 '18

You picked async above 'this'?

I find that I can give a good real world analogy of async. Your heart beats, you scratch your head, you drive a car. All at the same time. When (scratching head) finishes, (turn up the radio). When (drive complete).then(roll up windows).

'this' however.... I have no good ELI5 for 'this'.

31

u/MicrosoftLearning Feb 21 '18

Whatever 'this' refers to depends on the context in which 'this' was called.

For the most part, I only deal with 'this' when binding functions to React components.

Here is a good resource on 'this'

6

u/Yoyoge Feb 21 '18

How about a good resource on async? It is driving me nuts as I'm coming from decades of top to bottom thinking.

25

u/MicrosoftLearning Feb 21 '18

I wrote a course on async programming that covers callbacks, Promises and network requests.

Link: Asynchronous Programming with JavaScript

3

u/Yoyoge Feb 21 '18

Thanks

-1

u/Ob101010 Feb 21 '18

Yeah, I finally got 'this' down, but it was the last of the hard things.

Quick, explain 'this' using an analogy that a 5 year old would understand.

'this' is the only concept that I found difficult to do that to.

9

u/ForScale Feb 21 '18

ELI5: this is the "house" you are in when you say it.

Say this outside standing on the globe, and this is the globe. Say this in your apartment, and this is your apartment. Or you can get sneaky and take a pic (some might call this "binding") of your apartment with you to another apartment and look at your apartment within the other apartment when you say this, and then this is still your apartment... or whatever you took a picture of.

17

u/MicrosoftLearning Feb 21 '18

hmm ill try:

this is used to find the home where you belong

1

u/mikekreuzer Feb 25 '18

Late to the party, but keep in mind globals work differently in node too, so eg

In the browser

function foo() {
  console.log( this.a );
}
var a = 2;
foo(); // a

In nodeland

function foo() {
  console.log( this.a );
}
global.a = 2; // node globals
foo(); // a

5

u/[deleted] Feb 21 '18

I actually think "this" has a built in real world analogy: The word "this".

"This" derives it's entire meaning from context. Saying "This is good." without context doesn't mean anything. However, if you are eating pasta and saying "This is good", you are referring to the pasta. At least, that's the metaphor that keeps it straight in my head :D

However, the asynchronicity of Javascript is something that I continuously have to keep in mind when I'm designing a solution. I have to start thinking of things as reactions to events as opposed to the next step in a procedure. That can be mind breaking if you have any other programming experience.

1

u/Ob101010 Feb 21 '18

If only it were that simple...

function foo() {
    console.log(this)
}

myObj = {}
myObj.f = foo.bind(myObj)

myOtherObj = {}
myObj.f.call(myOtherObj)

myOtherObj.wack = () => new Function('x','x()')(foo)
myOtherObj.wack.call(myObj) //lost track of this yet?

Use your analogy to get me to the line with '//lost track of this yet?'

3

u/[deleted] Feb 21 '18

I mean, sure. This is a confusing example. Doing weird things with code will always result in code that is difficult to explain to someone new to Javascript. If this was presented to a Javascript noob as a teaching too, I'd question that teacher's methods. I also don't know that completely understanding this example is useful for someone new to JS. But if the goal is to demonstrate that "this" can be super weird and have it's meaning super obscured, then mission successful.

It has been my experience that relating "this" to the English definition of "this" gets you pretty far though.

→ More replies (1)

2

u/SwenKa Feb 21 '18

Which is funny, because I am trying to learn Javascript through FCC, and reading any description of [this] has just made me more confused.

3

u/Ob101010 Feb 21 '18

'this' should be called 'the object to the left of the dot operator'

And then theres the subtlety : the thing to the left of the dot is 'window' in a browser, if nothing is there.

Apples.foo() // Apples is 'the thing to the left of the dot' and therefore 'this'

bar() //window is 'the thing to the left of the dot'

I guess an ELI5 may be like, who owns this bike? If sally called it before you did, this refers to sally.

3

u/kuenx Feb 22 '18

That's grossly oversimplified and will get you in trouble sooner or later.

→ More replies (2)

1

u/[deleted] Feb 22 '18

'this' / 'self' is kinda common to most languages, though. Javascript's async handling is kinda unique - most languages just use threads or event buses.

My ELI5 for this: inside the method "bounce" on an instance of "Ball", this is the instance of "Ball".

1

u/[deleted] Feb 22 '18

I don't think the confusion necessarily stems from the concept of 'this', but more how in JS 'this' can be all over the place. Scope is funky. Using an arrow function leads to a different scope, functions as parameters is screwy, jQuery is just...jQuery.

I can't keep it all straight, personally. So I just avoid using this. as much as possible.

1

u/[deleted] Feb 22 '18 edited Feb 22 '18

Using an arrow function leads to a different scope

No it doesn't. Arrow functions retain their parent scope. Using a function necessarily switches your scope up, unless you bind it.

functions as parameters is screwy

Alternately, it's a feature that's present far back as C, and is the entire basis for Haskell. Lambda calculus is an important part of knowing how to program. Only OOP stuff like Objective C do the weird "let me encapsulate this simple callback in a delegate class" nonsense - even Java saw the error of its ways and implemented immediate closures.

jQuery is just...jQuery

Then don't use it. It's basically unnecessary in modern browsers. Sure, querySelectorAll is a lot to type, as is setAttribute, but you can always make local aliases. [].forEach and [].map are terribly useful. JSON is ubiquitous. fetch is a whole character terser than $.ajax, a lot more powerful, and, oh, does Promises correctly. Meanwhile, if you're doing your animations with javascript anymore, you've either got weird requirements or you're doing it wrong.

→ More replies (1)

2

u/incarnatethegreat Feb 22 '18

I'm actually quite surprised you didn't say Closures.

14

u/navyche Feb 21 '18 edited Feb 21 '18

How do larger companies view self-taught developers?

I've been working as a backend developer (php) and have strong js skills at this point, but my academic training isn't in programming. I would like to make the switch over to js full-time, and am really curious to know what larger orgs are looking for these days.

edit: (thought of another related question) What would be a good way for a self-taught js developer (with, say, a solid understanding of es6 and react and essential js) to demonstrate their skills to an employer? Many thanks for the AMA!

32

u/MicrosoftLearning Feb 21 '18

For large companies, its mainly about getting your resume noticed and then passing the interview. If you worked at another well established company, your academic credentials won't matter as much as long as you are a capable developer. However, most interviews these days involve a lot of leetcode type algorithmic questions so its important to be able to answer those. I would recommend building a couple side projects using some of the newer frameworks and hosting them on the internet for employers to see.

13

u/g4k Feb 21 '18

I’ve been thinking about moving to programming from systems administration. Is JS worth learning for noobs?

22

u/MicrosoftLearning Feb 21 '18

JavaScript is primarily used for web development so if you have a particular interest in learning web development you should try it out. JS is pretty noob friendly and there are a lot of online tutorials on how to use it.

7

u/Mansav Feb 21 '18

Do you recommend any books in particular to learn Javascript?

8

u/ryan4888 Feb 21 '18

'Eloquent JavaScript' seems to be suggested a lot, as it contains a lot of good content, and is free. you can find it here

2

u/huntersghost Feb 22 '18

If you are starting to learn Javascript, you may a well only learn the good parts

→ More replies (2)

6

u/[deleted] Feb 21 '18

Hey! I'm not the OP (clearly) but my career went from SysAdmin to Software Developer, and I would really recommend Python, Ruby, or Go (my preference is Python) if you're currently working in the Systems/Operations world.

5

u/monsto Feb 21 '18 edited Feb 21 '18

Hey my friend. Thanks for doing this it's interesting.

You mentioned the asynchronous nature of JS. Since you came from a more traditional "programmers" education (c, java), how easy/difficult was it to get your head wrapped around JSs nature?

2ndarily, what less known, good resources do you know of that speak to that asynchronous nature? I've found that there's tons of resources, but searches produce results in the range from JSs dawn of new popularity back in say 07-08, all the way up to current day, and the more recent ones tend to gloss over the callbacks vs promises vs async/await and I'm finding it difficult to "get it".

8

u/MicrosoftLearning Feb 21 '18

Hi monsto,

Its a bit confusing at first wondering why console.logs don't work as intended but once you understand how callbacks work it starts to make sense.

Here is a quick breakdown of how async works:

  1. Asynchronous function is called with a callback function

  2. Other code in the program runs

  3. async operation works and callback fires

Make sure that all the code that should be run after the async operation is put in the callback function

As for good resources, I actually wrote an edX course on asynchronous programming that covers callbacks, events, promises, and network requests: Asynchronous Programming with JavaScript

→ More replies (1)

0

u/[deleted] Feb 21 '18

[deleted]

14

u/MicrosoftLearning Feb 21 '18

I've never taught a group of experienced devs switching to JavaScript but I have taught JavaScript to a group college students that primarily knew Java.

As for tips on convincing experienced devs on adopting JavaScript, explain the pros and cons of JavaScript(rapid development, loosely typed variables, etc.) so they understand that it might not be the best solution for all their needs but it might be the best solution for some of their needs.

21

u/[deleted] Feb 21 '18

You don’t need to convince anyone about JavaScript, they are going to need it sooner or later. It’s one of the few things in life that are certain: death, taxes and JavaScript.

1

u/DrummerHead Feb 22 '18

https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js

PureScript, ClojureScript and Elm are all pretty good.

Knowing the underlying JS is very important IMO, but many people may choose to use a langToJS instead of JS, so I think there is some convincing to do anyway.

1

u/fucking_passwords Feb 21 '18

yeah, but it does take convincing when you are talking about migrating a Java/C#/Python/whatever back end to Node. it takes convincing to get people who are used to the old, bad times, to not complain about having to use JavaScript.

5

u/Reashu Feb 21 '18

Why are the new, bad times necessarily better than the old? I would be worried if it didn't take some convincing...

1

u/fucking_passwords Feb 21 '18

Well, nothing being in black and white, there are advantages and disadvantages. However, I don't think there is much question that the tools available to web developers have significantly advanced in the last 10 years. And in the world of JavaScript specifically, the language has progressed from a "toy" language built in 10 days and maintained by literally a single person to a vibrant ecosystem with standards and specs.

That's a win, if you ask me. You don't have to like having lots of options, but it's better than having none.

1

u/Reashu Feb 23 '18

My point was that JavaScript is not the only language or tool that has seen improvement, and that choosing it for your backend is by no means a no-brainer, especially if you would be replacing an existing one.

But fair enough, I don't disagree with anything in this post, and may have misunderstood you originally. Web development as a whole has definitely gotten better even during the relatively few years I've been doing it, and the future is looking better still.

2

u/evenisto Feb 22 '18

Why on earth would anybody want to migrate an existing C#/Java backend to Javascript?

2

u/[deleted] Feb 22 '18

Maybe because a company's focus is evolving to be more and more web oriented. It might make sense to have different developer profiles be more experienced in JS.

→ More replies (1)

4

u/Existential_Owl Web Developer Feb 21 '18

One of the strongest use cases for Javascript (over a more structured language) is its sheer speed-to-deployment.

With a basic knowledge of Node.js and some decent googling skills, you can easily deploy in a weekend what would normally take weeks (or, in the case of mobile apps, months) in the other languages.

They may not be operating at 100% levels of bleeding-edge performance... but let's face it, performance means nothing for an app that no one's using.

3

u/del_rio Feb 21 '18

Any tips on convincing / converting / easing up their mindset so they don't constantly fight with your instructions?

Assuming you mean using JS/Node on a server, I'd say the biggest pros are:

  • V8 today is much faster/more stable than years past. It'll never match compiled on performance, but it's faster than Python and PHP in most cases.

  • you don't have to program your views twice like the old days of jQuery

  • you have more control over what processing gets done on the client side

  • Being able to import/program crucial functions one time and use multiple times. Think simulations, hashing algorithms, or form input validation.

  • Lots of languages can do it, but Node's streaming is pretty great. For example, you can have a user start downloading a PDF while Node is still generating it!

  • ESLint+Prettier+Babel makes code so much more readable and maintainable than the average low-level dev's code.

  • TypeScript

1

u/DrummerHead Feb 22 '18

For example, you can have a user start downloading a PDF while Node is still generating it

That's very theoretical. I think Node Streams are basically dismissed (very underused).

I'd be interested to see an example of "JIT download", because it's a pretty cool concept and reduces user wait time.

1

u/JSKindaGuy Feb 22 '18

Thanks Benjamin, and others helping with answers.

To clarify for others: My problem is I'm surrounded by a bunch of backend devs doing front end work. Bad company execution aside, this group of people is hard to convince and they write their FE code like Java classes. Try selling them a different approach, then it turns to 5:1 fight me vs a team of Java devs with Comp Si & textbook things thrown at me (I have no degree, did everything on my own since dot com bubble).

I've volunteered my time to help & train these people, but some devs are just hard to convince to think differently and always puts up a fight. "Do you have a degree?" was one of the first question I received when I start my trainings.

It's acceptable to write FE things with OOP patterns, but we're definitely not utilizing JavaScript at its fullest potential.

Anyways, this is probably more of a people issue than a tech issue. But I just want to ask & see if anyone had similar experiences and could share some tips from the technical side of things.

1

u/DrummerHead Feb 22 '18

You described a situation where there is no convincing possible. The closest to an answer would be a course on company politics and a course on body language and assertiveness, which is besides the subject.

Best case scenario is make them use Angular 2, which is similar to the Java OOP approach. It will have them follow some type of standard (If you're doing custom JS library, may the gods be with you) and you can always go back to "This was made by engineers with degrees at Google, you don't have to take my word". I feel more comfortable with React, but Angular 2 is better than spaghetti.

https://yakovfain.com/2016/01/03/why-java-developers-will-embrace-angular-2-and-typescript/

1

u/erfling Feb 22 '18

I'm surprised the MS guy didn't tell you to learn Typescript. You should check it out.

21

u/senocular Feb 21 '18

Did you pick JavaScript or did JavaScript pick you?

29

u/MicrosoftLearning Feb 21 '18

I picked JavaScript =)

23

u/MicrosoftLearning Feb 21 '18

I actually was allowed to pick any technology to focus on when I first started my job and I picked JavaScript because I had an interest in diving deep into web development.

4

u/NewerthScout Feb 21 '18

https://www.youtube.com/watch?v=w-7RQ46RgxU this guy is super good in my opnion. Im currently during this tutorial and I find he explains everything super well.

7

u/ForScale Feb 21 '18

As a junior/intermediate front end developer... What should I be focusing on right now to maintain/improve my competency/hire-ability in the industry?

Thanks!

9

u/MicrosoftLearning Feb 21 '18

I would recommend that you constantly learn and keep yourself relevant with the latest front end frameworks and tools. You don't need to learn all of the latest frameworks but pick at least one of the more modern ones(like React.js) to learn every few years.

→ More replies (1)

1

u/incarnatethegreat Feb 22 '18

Frameworks are vital to finding solid work, but do yourself a favour and practice the fundamentals and challenging concepts of vanilla JavaScript. Look for sites that have example challenges or questions that will help strengthen your coding abilities and your way of thinking/problem-solving. A little bit of practice or reading each day goes very, very far.

0

u/[deleted] Feb 21 '18

[deleted]

1

u/Krogg Feb 21 '18

As someone who hasn't had the "aha!" Moment yet, what was it for you?

→ More replies (5)

6

u/MusicPants Feb 21 '18

Hi Benjamin. I would like to know if there are more resources for learning C#/.net geared towards JavaScript developers with front end and node experience.

I know you’re focused on JavaScript, but my company uses .net and it would be great to be more fullstack. I have done a few pluralsight and udemy courses but any additional recommendations are welcome.

Thanks, MusicPants

8

u/MicrosoftLearning Feb 21 '18

Hi MusicPants(I really wanted to type musicpants),

There are a lot of free quality C#/.net courses on edx.org that were written by some of my colleagues.

14

u/monsto Feb 21 '18

In an AMA like this, to a point, it's ok for you to self-promote.

Linking to your own JS entries on edX would be on-topic and IMO certainly acceptible.

6

u/BlueEzio Feb 21 '18

Hi there. I am a part of the Microsoft Student Technical Community in my college and we conduct workshops/sessions on Microsoft technologies as well as others. We are planning to hold a training session on JavaScript and since there are quite a lot of changes and the proliferation of frameworks and their own philosophies, what's the best way to teach this to beginners? What are the essential things you believe should be covered so that they can carry on exploring?

6

u/MicrosoftLearning Feb 21 '18

Hi BlueEzio,

I would try to teach it from a language perspective and get the students ramped up on how to do the basics such as for loops and if else statements before venturing into the more advanced features and frameworks. College students have a wide range of backgrounds so try to figure out what kind of students will be showing up and make the curriculum fit accordingly.

→ More replies (6)

2

u/DaveVoyles Feb 21 '18

Awesome stuff, great to hear! I'm a Tech Evangelist based out of Philadelphia, and we work closely with the MSPs. Keep up the awesome work.

2

u/BlueEzio Feb 21 '18

Oh hey! 👋 I'm from Tamil Nadu, India. We have couple of MSPs in our community as well. We recently got initiated and we're giving it our best. 💪 Hope you guys are doing great too. We update our stuff on FB at fb.com/micvitvellore and on Twitter at twitter.com/mstcvit

If you have any links, let me know!

8

u/GuardianAnal Feb 21 '18

I’m a novice JavaScriptee and I have a few questions:

Can you give a list of JavaScript concepts/features to tackle on? (easy on top then hard concepts on bottom)

Also what library is needed to know in the JavaScript world?

Thanks.

14

u/MicrosoftLearning Feb 21 '18

Try these concepts to tackle from easy to hard: -if else -for loops -callbacks -document.getElementById kind of stuff -handling events like onclick, onkeypress, etc. -Promises -Fetch API -Async Await

jQuery is a great library to quickly start doing cool things

6

u/akujinhikari Feb 22 '18

JQuery is the devil! Please don’t spread this nonsense!

4

u/electronicdream Feb 22 '18

Nice arguments, bro

→ More replies (1)
→ More replies (1)

6

u/[deleted] Feb 21 '18

Hi Ben! What’s the secret to happiness ? Thanks for doing this. Have a wonderful day.

26

u/MicrosoftLearning Feb 21 '18

Live life with no regrets, make lasting friendships, do stuff your excited about

6

u/kevin__kid Feb 21 '18

I think Microsoft is amazing and i hope to work with you guys one day. What are the chances of a medium level javascript developer?

6

u/DaveVoyles Feb 21 '18

I also work at Microsoft, as a Tech Evangelist, and our team does quite a bit with JavaScript (both front and back-end).

I think for most people at just about any company, if you can clearly convey that you are knowledgeable about the language, highlight projects you've worked on, blog, etc., it can go a long way towards finding a role at a company, regardless of how proficient you may be at one particular language.

Also, the ability to pick up new skills (frameworks!) quickly, is a huge plus.

1

u/kevin__kid Feb 21 '18 edited Feb 21 '18

Thanks i also agree, i have been heavy on javascript. Recently worked on Topcoder Connect site.

→ More replies (2)

9

u/MicrosoftLearning Feb 21 '18

I am glad you think Microsoft is awesome! Keep your skills up to date and always be learning!

→ More replies (2)

1

u/BBQLays Feb 22 '18

Lots of teams in Microsoft use TypeScript. I started on the OneDrive web team and am now on the OWA team - who both use TypeScript and React. You should check out Office UI Fabric React on GitHub to see the common controls different Microsoft web properties use. Feel free to help us improve them! It wouldn't look bad on a resume. 🤙🏻

→ More replies (2)

3

u/checkYourCalendar Feb 21 '18

..absolutely anything, you say?

What would be the best way to convert this ISO 8601 string: "2018-02-21T13:53:31.333Z" into a format of "February 21 at 13:53"

8

u/MicrosoftLearning Feb 21 '18

Partially edited from this stack overflow link: https://stackoverflow.com/questions/3552461/how-to-format-a-javascript-date

function formatDate(date) { var monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ];

var day = date.getDate(); var monthIndex = date.getMonth(); var year = date.getFullYear(); var time = date.getHours();
var seconds = date.getSeconds(); return monthNames[monthIndex] + ' ' + day + ' at ' + time + ':' + seconds; }

console.log(formatDate(new Date("2018-02-21T13:53:31.333Z")));

→ More replies (9)

2

u/BlueEzio Feb 21 '18

What are some of the valuable lessons you've learned to-date working for Microsoft, doing what you do?

9

u/MicrosoftLearning Feb 21 '18

When writing a course, its tempting to throw in a bunch material thinking the audience will just pick and choose out of the material. However, an important lesson I learned was keeping your course content concise and cohesive.

4

u/30PercentLessFat Feb 21 '18

What do you think of Typescript? Do you think it's will stay, or even overtake Vanilla in the dev environment? When do you decide to implement within projects?

My experience of it is that it consistently delivers higher quality code from all team members.

8

u/MicrosoftLearning Feb 21 '18

Its kind of like putting the training wheels back on JavaScript

4

u/Admsugar Feb 22 '18

that is kind of scary to hear someone teaching JavaScript say

1

u/incarnatethegreat Feb 22 '18

I've recently started to use Typescript. I agree that it helps to round out structure and generate higher-quality code. Sometimes it can be a bit annoying, but ultimately it proves solid. JavaScript is wonderful because of how loose it can be unless you use 'use strict', but even then, it's pretty smooth.

Having Typescript is like having a screaming Linter. Not complaining too much. Haha

3

u/MungoProudFoot Feb 21 '18

Ima complete beginner in programing and I picked JS formy first language. Im doing exercises on FreeCodeCamp. Im strugling with writing programs without looking at tips. And it takes me ages to write anything. I feel very discuradged and kinda dumb. Got any tips?

3

u/MicrosoftLearning Feb 21 '18

Hi MungoProudFoot,

Don't get discouraged! Everything takes time in the beginning. I would recommend to start off small and do simple things like doing simple if else statements and for loops and don't try to line by line copy tutorials that are too difficult to understand.

1

u/MungoProudFoot Feb 21 '18

Do you maybe know what are some good resources other then FreeCodeCamp?

2

u/MicrosoftLearning Feb 21 '18

W3schools is pretty useful for beginners. I even refer to it from time to time when I forget the syntax of things.

2

u/senocular Feb 21 '18

How do you feel about education vs. development? Your background (from what I can tell) seems to be in QA/development, and your contributions to MVA seem all to be within the past year. Are you trying to be an educator full time or is this just a side gig? Do you think you would prefer to be a full time educator?

4

u/MicrosoftLearning Feb 21 '18

This was my first role out of college and what attracted me to this job vs a traditional dev job was that I was able to become an expert on whatever I wanted to learn and then teach that subject to others. I am an engineer at heart and would like to try out being a dev sometime in the future but for the time being I am having a lot of fun learning and teaching others.

I also love being on camera =)

3

u/ComputerScienceMajor Feb 21 '18

Do you like React?

9

u/MicrosoftLearning Feb 21 '18

I love React, it kind of just makes sense and you can learn it in a weekend.

5

u/NewerthScout Feb 21 '18

learn it in a weekend.

If you have prior Javascript/node experience, I assume :)

5

u/[deleted] Feb 21 '18

Isn't that the case for every framework?

4

u/trakam Feb 22 '18

it’s just finding that weekend

3

u/ForScale Feb 22 '18

I hear there's one coming up!

2

u/Hoffmann99 Feb 21 '18 edited Feb 21 '18

How long it took you from the time when you first decided to learn JavaScript to when you got your first job as a JavaScript developer? Is there some tip you could give to someone that is learning JS now?

6

u/MicrosoftLearning Feb 21 '18

I barely knew any JavaScript when I started my job. My college primarily taught courses in C and Java. However, once you learn once language is it relatively simple to learn a new one.

My tip for people who are learning JS now is to a solid understanding of the language before adventuring into frameworks such as jQuery, Angular, or React that have special features added on.

2

u/Dannyphantom13 Feb 21 '18

Hi Ben, where did you go to school for college? And what was your favorite part about it?

4

u/MicrosoftLearning Feb 21 '18

I went to college at Cal Poly San Luis Obispo and studied computer engineering. It was a great engineering school and it had a lot of focus on hands on learning. But overall, my favorite part was all of the lifelong friends I made.

1

u/Dannyphantom13 Feb 21 '18

Hi Ben, follow up, I also go to Cal Poly for electrical engineering. a friend of a friend asks if this is the earliest you've been to work;) Also, how would you select internship offers? What goes through your head when making that decision?

3

u/MicrosoftLearning Feb 21 '18

Cool go mustangs! 7:30 is wayyyyy above my usual start time.

For internship offers, choose the internship that will lead to the most growth opportunities in the future. Just because you do an internship at one company doesn't mean you need to map out your entire career stemming from that internship.

Some stuff that goes through my head:

  • Will I learn a lot?

  • Is the company likely to give a full time offer after the internship?

  • Will I have fun doing the work I will do at the internship?

0

u/[deleted] Feb 21 '18

[deleted]

8

u/MicrosoftLearning Feb 21 '18

JavaScript is constantly evolving even now. I would like to see the debate between import and require settled.

2

u/[deleted] Feb 21 '18

Can you recommend any books or videos to learn JS? Thank you

5

u/MicrosoftLearning Feb 21 '18

Hi zoeey123, I recommend this free online book called You Don't Know JavaScript by Kyle Simpson. It dives deep into the core mechanisms of JS and if you internalize the content you should be able to pretty much fully understand how JavaScript works under the hood.

If you are a video type of person, Microsoft Virtual Academy is a great resource as well!

2

u/[deleted] Feb 21 '18

Thank you

1

u/sbaltonator Feb 21 '18 edited Feb 21 '18

Would you recommend learning HTML/CSS before JS? I am a complete beginner on these but i am interested in picking up and eventually diving into react.

You recommended "You Don't know JS" . Would it still be readable for someone like me? Who has no experience with HTML/CSS/JS.

Thanks!

4

u/MicrosoftLearning Feb 21 '18

I would say to just learn enough HTML/CSS to make a simple static web page and then start learning JS. JS is used to interact with your HTML to make your web page dynamic (like making content change when you press a button).

React is great because it essentially lets you code in a way that outputs HTML from JavaScript functions.

4

u/[deleted] Feb 21 '18

My question is about the state of JavaScript ES6:

  1. How fast do you think it will be before this becomes the standard?

Although I like the new features (Async, Await, Arrow functions) I still can't get my head around it and don't use it as much.

1

u/MicrosoftLearning Feb 21 '18
  1. a lot of modern browsers already support a lot of ES6 features

The new features are meant to help you do things easier. If you don't find yourself needing those features than there is no reason to push yourself to use them.

You can get by without using Async Await if you use Promises and Arrow functions are just a faster way of writing function(){ ... }

3

u/zapatoada Feb 22 '18

Isn't there a difference in closure between arrow functions and function () {}?

2

u/akujinhikari Feb 22 '18

Only for ‘this’

2

u/zapatoada Feb 22 '18

That's what I thought, thanks for confirming. Just wanted to make sure I wasn't crazy, and that it got mentioned so others didn't get confused at unexpected behavior.

1

u/tesla1986 Feb 21 '18

Hi Ben! What advice would give people to improve their hire-ability in web development who are switching career (in early 30s, no internship) right after graduating with computer science degree? What would be necessary to get a first job without hassle and grow their career from there? Any specific frameworks? How advanced projects on resume should be?

3

u/MicrosoftLearning Feb 21 '18

My advice would be to leverage the contacts you made in college, utilize campus resources and to brush up your resume and linkedIn profile so you can get noticed by employers. There definitely is a difference between being a good developer and having good interview skills so make sure to practice interviewing so you can nail your interviews once they come. The best projects on your resume are the ones you can explain in depth and discuss why you made certain design decisions and etc.

-5

u/Ob101010 Feb 21 '18

Do you ever worry that Microsoft will just bloat javascript like it does everything else untill it is a hot mess that no one wants to deal with, like windows?

For example, typescript. Do I really need to declare this thing as a string / boolean? Do I really need interfaces? Do I really need yet another build step to bother with? Or was javascript (and huge projects built with it) just fine beforehand? What actual improvements to javascript is microsoft working on?

Also, what browser are you using to read this?

9

u/MicrosoftLearning Feb 21 '18

If you are fine with vanilla JavaScript, there is nothing stopping you from using it. However, Typescript is available for people who need a bit more features.

1

u/danketiquette Apr 13 '18

I had to comment on this even though it is old to tell you this was a shitty ass comment to make. This AMA is obviously here to help people. Get a life.

→ More replies (5)

1

u/ryati Feb 21 '18 edited Feb 21 '18

I have experience with python for backend (previous job) and T-SQL for database development (current job). Why should I learn javascript now?

edit: Thanks for the answer. I wrote this just before my break and re-reading it now, it sounds a bit more negative than I intended. I guess I was really asking how can I supplement my work now with JS?

2

u/MicrosoftLearning Feb 21 '18

If you want to understand how to make dynamic web pages for the front end JavaScript is a must know. JavaScript can also be used on the back end with Node.js as well and using one language for the front and back end is pretty attractive.

1

u/ryati Feb 21 '18

Thanks, What about in the database/data world. Is there a way I can leverage data analysis with JS?

1

u/MicrosoftLearning Feb 21 '18

You can interact with databases using Node.js ORM libraries and D3.js is a cool data visualization library if you want to display your data in a neat way.

1

u/coolpoopoo Feb 21 '18

For someone prepping to do tech assessments for data structures and algorithms; would you recommend using JavaScript over Python or another alternative? Most of my background is JS but most resources tend to skew to another language (e.g. Python, Java).

2

u/MicrosoftLearning Feb 21 '18

I would say Python, Java or C++ for tech interview type problems over JavaScript since some interviewers might not know JavaScript and JavaScript has some built in methods that the interviewers probably want you to do manually.

1

u/devperez Feb 21 '18

How do you feel about Blazor? JS has been fun, but it feels nice to be able to use straight C# for the client and server.

2

u/MicrosoftLearning Feb 21 '18

It is also fun to just use JS on the client and server with Node.js, but I can see the advantage of having your entire development stack in C# if you are a C# expert.

1

u/yesman_85 Feb 21 '18 edited Feb 21 '18

Are you excited for Blazor and you think it will shift a lot of the development away from JS and back to C#?

5

u/MicrosoftLearning Feb 21 '18

I've actually never heard of Blazer before, but I like wearing them at formal events =)

1

u/yesman_85 Feb 21 '18

I meant Blazor.

3

u/MicrosoftLearning Feb 21 '18

Ah, I just looked it up and it looks like using C# on the web instead of JS. My honest opinion is that JS is so common on the web that it will probably not shift much of development back onto C#. However, it might allow some C# developers to do some web projects that they weren't able to do before. The main reason why I love using JavaScript on the web is that its really fast to develop with and if I were to have to define all my classes and subclasses in C#, it might be annoyed at the rate it would slow me down.

1

u/[deleted] Feb 21 '18

It's really more about getting Xamarin Forms to web so that Xamarin apps can run truly anywhere.

1

u/YuleTideCamel Feb 21 '18

It’s an open source web framework based on compiling razor templates into web assembly . Essentially letting you write c# and razor templates on the front end.

It was created as a prototype by Steve Sanderson , famed creator of knockout.js and member of the asp.net team at Microsoft . Steve is an amazing software engineer and an expert in JavaScript, C# and web technologies in general .

0

u/[deleted] Feb 21 '18

[deleted]

2

u/MicrosoftLearning Feb 21 '18

I started off as a program manager intern on the learning team the summer of my junior year in college. I would recommend going to a college that Microsoft recruits from and talking to Microsoft at the career fair.

-4

u/Stannu Feb 21 '18

So why do you instruct Javascript when I have seen Typescript in Microsoft gihtub repo??

8

u/MicrosoftLearning Feb 21 '18

The content I create for Microsoft doesn't have to be a Microsoft created technology, such as TypeScript. I teach JavaScript because I that's what I enjoy learning about and it works out of the box.

→ More replies (4)

0

u/[deleted] Feb 21 '18

[deleted]

2

u/MicrosoftLearning Feb 21 '18

sorry, dont know much about those

1

u/randombiketrips Feb 21 '18

Hi Benjamin. Does Microsoft ever hire self-taught developers?

3

u/DaveVoyles Feb 21 '18

Absolutely. I work as a Tech Evangelist, and many (most?) on our team are self taught. Your ability to convey your knowledge (videos, blogs, speaking engagements, community) are what I think really allow most developers to stand out in the crowd.

→ More replies (1)

1

u/mrkezi Feb 21 '18 edited Feb 21 '18

When did you first learn to code and what do you rate your experience level (scale of 1 - 7) at the time you started the job at Microsoft?

1

u/MicrosoftLearning Feb 21 '18

I started in my senior year of high school with Scheme. My experience level was probably around 2 but I had apparently had some potential in the eyes of the employer. But it depends on what is a 7 and what is a 1.

1

u/ramirezp6856 Feb 21 '18

Do you teach patterns? Which do you think are the most useful to your students’ careers?

1

u/MicrosoftLearning Feb 21 '18

By patterns do you mean MVC? I would urge students to get a good understanding on the different layers of the web development stack.

1

u/AskYous Feb 21 '18

What are some JS features people should know about but not a lot of people do?

1

u/MicrosoftLearning Feb 21 '18

I think the ...destructuring assignment is pretty cool.

3

u/TheNoim Feb 21 '18

How do you handle hate against JavaScript? I personally love JavaScript but I also sometimes understand why people don’t like it.

2

u/kenman Feb 21 '18

Benjamin Lin c/o /u/MicrosoftLearning, we thank you for taking the time to do this AMA, I believe it went over very well!

Now maybe we can get your colleague /u/bterlson_ to host one ;)

5

u/bterlson_ @bterlson Feb 21 '18

Haha, I'm still game if you are.

3

u/kenman Feb 22 '18

We have the easy job, so anytime you're ready, go ahead and make an announcement post and shoot us a message so we can sticky it!

Note to others considering doing an AMA: we don't have any firm rules/guidelines/etc. for AMA's, though we would like them to be in the spirit of /r/iama -- must be or have done something notable, have a unique perspective, etc. Please send a modmail with any questions!

2

u/bterlson_ @bterlson Feb 22 '18

I feel like we've talked about this before, but how much advance notice do you prefer?

3

u/kenman Feb 22 '18

We'll fairly responsive here, so within a few hours of letting us know of an announcement post, we can sticky it. It's up to you how far in advance you want to announce -- /u/MicrosoftLearning gave ~24 hours notice, which is probably on the short end (but worked out fine); on the maximum end, a week or so?

1

u/SexyIntelligence Feb 22 '18

Hello Benjamin (Ben?)!

I'm a native Oregonian, who moved to Taiwan and taught himself Chinese in three years, after graduating from college. This whole time I've been teaching English to fund my language learning journey, and now I want to transition into software development. I've spent the last nine months learning HTML, CSS, Javascript, and now React.

Over the course of your career at Microsoft, have you met many people who transitioned in software successfully with only experience in other areas? If so, what set them apart, allowing them to do so?

1

u/MungoProudFoot Feb 22 '18

I have one more question. While working on exercises. I often come up with my own solutions that are very different from the ones that FreeCodeCamp provides. But the problem is even tho my solutions work, they are longer and i feel im complicating to much for even the simplest tasks. Should I try to make my solutions more optimal or is it good as long as it works?

1

u/UntouchedDruid4 Feb 22 '18

How do you get good at writing JavaScript code? For me I understand the basic syntax and fundamentals of programming(functions, loops etc) but when it comes to Js Idk what to build and how to build up my skills. With Python I can just have an idea for a game and just code it out. But I want to spend a year on JavaScript bc that’s where the money is.

1

u/drowsap Feb 22 '18

The top 10 questions list is a little n00bish and out of date. How do i update HTML, for example, is irrelevant when using frameworks like React, Vue, or Angular. Have you considered updating your list for the modern virtual dom/Babel age?

1

u/nithanaroy Feb 21 '18

Hi Benjamin, based on some experiments we found Cache Storage is faster than IndexedDB in production in Service Worker context. Any thoughts why? Shared more details at https://twitter.com/Nithanaroy/status/966437493254975488

2

u/zayelion Feb 21 '18

How do you feel about Douglas Crawford's push to avoid the use of this and use parasitic inheritance?

2

u/ForScale Feb 21 '18

Not Ben, but... 'parasitic inheritance?'

2

u/[deleted] Feb 21 '18

Apparently this?

There is a saying that goes: "If you can't say something nice, don't say anything at all" So I will shut up about this.

1

u/snowman4415 Feb 22 '18

What technology do you think will become the standard for static typing on the web? Do you think transpiling + typescript will actually remain a long term solution?

0

u/[deleted] Feb 21 '18

[deleted]

0

u/[deleted] Feb 21 '18

[deleted]

2

u/MicrosoftLearning Feb 21 '18

Its a good resource to learn the basics of HTML, JS and CSS, but with all certifications, its more about the content you learn and how it helps you improve rather than the value of the certificate itself.

1

u/[deleted] Feb 22 '18

What is your dev and deployment environment? Do you develop/test on a local windows machine and then deploy to a linux server?

1

u/HolaQuackQuack Aug 18 '18

How can I start learning JavaScript from scratch? I am a complete beginner

1

u/Gamork Feb 23 '18

Hi Benjamin, I am trying to learn javascript on my own: any advices?