<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Otto Nagengast</title>
    <description>The latest articles on DEV Community by Otto Nagengast (@o_nagen11).</description>
    <link>https://dev.to/o_nagen11</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F461788%2Fd14c4ab2-7a09-4996-9856-30a4805a281c.jpeg</url>
      <title>DEV Community: Otto Nagengast</title>
      <link>https://dev.to/o_nagen11</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/o_nagen11"/>
    <language>en</language>
    <item>
      <title>Moment.js &amp; The Selflessness of Developers</title>
      <dc:creator>Otto Nagengast</dc:creator>
      <pubDate>Fri, 18 Sep 2020 03:10:20 +0000</pubDate>
      <link>https://dev.to/o_nagen11/moment-js-the-selflessness-of-developers-3o5k</link>
      <guid>https://dev.to/o_nagen11/moment-js-the-selflessness-of-developers-3o5k</guid>
      <description>&lt;p&gt;A couple of days ago, I saw a post on Hacker News about some announcements from Moment.js. If you’ve done web development with JavaScript, there’s a good chance you’ve used Moment.js. If you’re not familiar with it, it’s a library that makes it much easier to work with times and dates. &lt;/p&gt;

&lt;p&gt;I clicked through to the announcement to see if there were any new or deprecated features that I should be aware of. Instead there was something very different. At the top of their &lt;a href="https://momentjs.com/docs/"&gt;main documentation page&lt;/a&gt;, the Moment.js team had added a long preamble.&lt;/p&gt;

&lt;p&gt;First they discussed how popular the package is (12 million downloads a week!) and then some common complaints (Moment objects are mutable!). Then they dropped a bomb: “We recognize that many existing projects may continue to use Moment, but we would like to discourage Moment from being used in new projects going forward.” Woah! &lt;/p&gt;

&lt;p&gt;The surprises kept coming. The authors explained some of the main drawbacks of Moment.js and they provided extensive links to deeper explanations and alternatives. But they also make it clear that they are not killing Moment.js. It is too important to too many projects. They will continue to make critical fixes and updates. They just won’t be adding new features. As they put it, “ [Moment.js] is not dead, but it is indeed done.”&lt;/p&gt;


&lt;center&gt;
&lt;br&gt;
...&lt;br&gt;
 &lt;strong&gt;Do you want feedback on your JavaScript code?&lt;/strong&gt;&lt;br&gt;
 &lt;strong&gt;Come join our code review Slack group!&lt;/strong&gt;&lt;br&gt;
 &lt;strong&gt;Just click the link at the top of our landing page: &lt;a href="https://antcode.dev"&gt;https://antcode.dev&lt;/a&gt;.&lt;/strong&gt;&lt;br&gt;
...&lt;br&gt;
&lt;/center&gt;

&lt;p&gt;Stop and think about this situation for a moment (pun intended). To appreciate how peculiar it is, let’s consider a similar situation in a different context. What if Apple operated like Moment.js? You walk into the Apple store to buy a new phone. An employee tells you, “Actually, you shouldn’t buy an iPhone. You should go buy a Samsung. The camera is way better, and the battery lasts way longer. But you can keep using your current iPhone. We’ll make sure any software updates work seamlessly with your old model.” If this happened to me, I would think the salesperson was either crazy, pissed at Apple and trying to get revenge, or playing some reverse psychology trick to actually get me to buy an iPhone.&lt;/p&gt;

&lt;p&gt;But in open source, this sort of thing is normal. People build something and put it out into the world. Other people start using it, and they notice flaws. Some of them choose to contribute code to fix those flaws. Most just complain and hope that someone else will fix them. The maintainers work hard to make everyone happy which is a nearly impossible task. In fact, users of open source projects can sometimes get downright nasty and mean with the maintainers.&lt;/p&gt;

&lt;p&gt;What do the maintainers get for all of the work, stress, and abuse? Money? Maybe they’re lucky to get some sponsorship money but it’s not going to make them rich. (The Moment.js team explicitly turned down sponsorship because the core team members all have good jobs and don’t need the money). What about recognition? Maybe, but how much does the world care about GitHub stars? Their resume? Perhaps but there are more efficient ways to get lucrative software engineering jobs. &lt;/p&gt;

&lt;p&gt;I would argue that the main motivation is selflessness. Developers want to help other developers. They want to contribute to the common good. What a beautiful thing. With one piece of code, a developer can help people around the world now and for years to come. But then when something new comes along that better serves the common good, it is time to graciously and selflessly step aside.&lt;/p&gt;

&lt;p&gt;This is what the maintainers of Moment.js did this week. We should congratulate them not just on their great work but also admire them for their ability to put the community before themselves.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>opensource</category>
      <category>motivation</category>
    </item>
    <item>
      <title>How to Cram for a Job Interview</title>
      <dc:creator>Otto Nagengast</dc:creator>
      <pubDate>Wed, 16 Sep 2020 05:08:52 +0000</pubDate>
      <link>https://dev.to/o_nagen11/how-to-cram-for-a-job-interview-a5m</link>
      <guid>https://dev.to/o_nagen11/how-to-cram-for-a-job-interview-a5m</guid>
      <description>&lt;p&gt;I remembered that I had the interview 30 minutes before it started. I do stuff like this a lot. Details just don’t stick in my mind - even if they are really important details.&lt;/p&gt;

&lt;p&gt;I threw on some khakis and a shirt with a collar and ran out the door. Thankfully, the company was just a couple blocks away so I could make it on foot. I jogged through the lunchtime rush of people and arrived in a heaving and sweaty mess. The receptionist offered me some water. I chugged it. She offered me some more. I drank that glass a little more slowly and tried to gather myself.&lt;/p&gt;

&lt;p&gt;I had been interviewing for a couple of weeks at other companies already, so I wasn’t overly nervous. However, I was totally unprepared. I whipped out my phone and started Googling. I instinctively prepped for the questions I was asked at other interviews. Ten minutes later, the recruiter came to take me to the first session of the afternoon. The next day, I got an offer.&lt;/p&gt;

&lt;p&gt;I only did well at that interview because I knew what to expect so I could cram. You probably remember the feeling from school. You become a pro at gaming the system by studying just what you needed to in order to do well on the exam. You can do the same thing with job interviews.&lt;/p&gt;

&lt;h1&gt;
  
  
  Here is a list of 7 points to prep before going in.
&lt;/h1&gt;

&lt;p&gt;They are ranked by importance so if you’re pressed for time, just start at the top and get as far as you can.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Learn what the company does. Be able to explain it in a couple &lt;br&gt;
     of sentences.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Come up with an answer to the question: “Why do you want to &lt;br&gt;
     work here?” A good fallback is to talk about 3 things: the &lt;br&gt;
     company’s product / service , the company’s culture, and the &lt;br&gt;
     role.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Prepare questions to ask your interviewers that you can't find &lt;br&gt;
     answers to on the internet. Here are good ones that work well &lt;br&gt;
     (ranked by quality):&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;1. What is the main focus of the company at the moment?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;2. What do you think is one thing that this company does &lt;br&gt;
    exceptionally well?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;3. What's the average amount of time people spend in one role &lt;br&gt;
    before changing to another one?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;4. What kind of person would not be happy working here?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;5. What are the best and worst parts of working here?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;6. What have been some growing pains for the company?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;4. Understand the size and importance of the problem that the &lt;br&gt;
     company is solving.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Look up what stage they are at and how many employees they have.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Understand how the company fits into the competitive landscape. &lt;br&gt;
   Who are their main clients? Who are their competitors?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. If you’re told beforehand, look up who you'll be talking to. &lt;br&gt;
   What's their current position? How long have they been there? &lt;br&gt;
   Where were they before? Use that information to better engage &lt;br&gt;
   with people during the interviews.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's it!&lt;/p&gt;

&lt;p&gt;If this was helpful, I'd be really grateful if you could like it so that it pops up in more people's feeds.&lt;/p&gt;

&lt;p&gt;Happy interviewing!&lt;/p&gt;




&lt;h3&gt;
  
  
  Are you applying to jobs and want to perfect your portfolio?
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Come get some feedback on your code in our code review Slack group.
&lt;/h3&gt;

&lt;h3&gt;
  
  
  To join, just click the link at the top of our landing page: &lt;a href="https://antcode.dev"&gt;https://antcode.dev&lt;/a&gt;.
&lt;/h3&gt;

</description>
      <category>career</category>
      <category>interview</category>
    </item>
    <item>
      <title>A Brief History of JavaScript</title>
      <dc:creator>Otto Nagengast</dc:creator>
      <pubDate>Mon, 14 Sep 2020 08:53:51 +0000</pubDate>
      <link>https://dev.to/o_nagen11/a-brief-history-of-javascript-40c5</link>
      <guid>https://dev.to/o_nagen11/a-brief-history-of-javascript-40c5</guid>
      <description>&lt;p&gt;JavaScript is the most popular programming language in the world and has been for years. How did this happen?&lt;/p&gt;

&lt;h1&gt;
  
  
  The World Wide Web + JavaScript, Together Always (almost)
&lt;/h1&gt;

&lt;p&gt;In 1993 a team led by Marc Andreessen at the University of Illinois released the Mosaic web browser. It was the first browser with a graphical user interface which made the web accessible to anyone who had even basic computer skills.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nSDVl_LY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xamui421ykdldnny2bn3.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nSDVl_LY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xamui421ykdldnny2bn3.gif" alt="Alt Text" width="186" height="215"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;A young Marc Andreessen&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2W1-2ayw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ap1vmst3v04ckhhlu5k2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2W1-2ayw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ap1vmst3v04ckhhlu5k2.jpg" alt="Alt Text" width="600" height="560"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The Mosaic web browser&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;The Mosaic team was based in a research center, the National Center for Supercomputing Applications (NCSA). As the Mosaic browser took off, the people who ran the NCSA slowly took control of it. Andreessen was pushed out, so he moved to Silicon Valley and found a job. But then he was approached by Silicon Valley legend Jim Barksdale to make something for the web. Andreessen decided to make another browser. He hired the old Mosaic team back, and they rebuilt a browser entirely from scratch. But this version was better, of course, because they learned from all their mistakes from the first one they made.&lt;/p&gt;

&lt;p&gt;The result was the Netscape browser. It crushed Mosaic and it made Marc Andreessen the first of a new generation of young people made unbelievably rich by the internet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IQbyMGr1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rte3jh0t0r40hi8goozz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IQbyMGr1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rte3jh0t0r40hi8goozz.jpg" alt="Alt Text" width="400" height="527"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Marc Andreessen, still young but now rich and famous&lt;/em&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Webpages Needed Interactivity
&lt;/h1&gt;

&lt;p&gt;From the very beginning, it was clear that webpages had a fundamental limitation: They weren’t interactive.&lt;/p&gt;

&lt;p&gt;Every time you clicked on a link, the current page you were looking at would go away while a whole new page was fetched from a server and then rendered on your screen. This was because webpages could only use HTML and CSS. They needed something to make them come alive!&lt;/p&gt;

&lt;h1&gt;
  
  
  JavaScript = Life
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NyJ1dOhu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8rril6rjuhkbe7cy7c6j.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NyJ1dOhu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8rril6rjuhkbe7cy7c6j.gif" alt="Alt Text" width="500" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Andreessen and Netscape believed that 2 languages needed to be supported in the browser: Java and a smaller, simpler scripting language. Roughly speaking, companies would build sophisticated stuff in Java. Designers, hobbyists, and hackers would build smaller things in this new scripting language that Netscape would create.&lt;/p&gt;

&lt;p&gt;Andreessen tapped Brendan Eich to come up with something. And in 10 days, he invented the first version of JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xc6FgWhX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zcsm4017xsw3w2wjf887.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xc6FgWhX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zcsm4017xsw3w2wjf887.jpg" alt="Alt Text" width="240" height="315"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Brendan Eich, Father of JavaScript&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Except what Eich created wasn’t called JavaScript at first. Andreessen named it Mocha. (I guess coffee was the most inspiring thing around developers in the 1990s in Silicon Valley). Then the name was changed to LiveScript and shipped in a release of the NetScape browser in September 1995. But three months later, they changed the name again to JavaScript, which has since generated confusion for people everywhere. Why did they pick JavaScript? Marketing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D1hsa6QV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yf6sv28wm467zc6wvw3j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D1hsa6QV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yf6sv28wm467zc6wvw3j.jpg" alt="Alt Text" width="880" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s right - marketing. Sure, JavaScript was inspired by Java but not enough to warrant including Java in the name. The truth is the NetScape team wanted people to associate their new language with the hot language of the day - Java - even if in reality the two languages weren’t connected in any meaningful way.&lt;/p&gt;

&lt;h1&gt;
  
  
  JavaScript is Caught in a War
&lt;/h1&gt;

&lt;p&gt;The internet was clearly the next technological wave, so everyone wanted in on it. Including Bill Gates.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jvTPtWfL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/k188eo9s31yb8x927hh8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jvTPtWfL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/k188eo9s31yb8x927hh8.jpg" alt="Alt Text" width="880" height="587"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;A young Bill Gates, seducing us with his operating system&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Bill Gates and Microsoft created Internet Explorer and bundled it with Windows software, which meant that Internet Explorer became the default web browser for most people. Over the next couple of years, Netscape and Internet Explorer battled for market share.&lt;/p&gt;

&lt;p&gt;JavaScript got caught in the middle of this. Instead of using JavaScript, Microsoft created their own version called JScript (seriously). Netscape decided to try to find peace where great powers at war go to find peace: Switzerland.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CHzHff5B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z6rq9dh0lpid9vvi7ias.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CHzHff5B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z6rq9dh0lpid9vvi7ias.jpg" alt="Alt Text" width="880" height="642"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Specifically, they went to ECMA, which used to stand for “European Computer Manufacturers Association”. But now it’s global and is just known as ECMA. ECMA sets standards for technologies so that they can safely and confidently be used everywhere.&lt;/p&gt;

&lt;p&gt;Netscape put forth an ambitious proposal, ECMAScript 4, that would have made some huge additions to JavaScript. The language would become more sophisticated (which would have pleased big companies) but harder to use (which would have made it less accessible). Some famous JavaScript developers, like Douglas Crockford, did not agree with this direction. Neither did Microsoft. They also wanted to crush everyone else in the browser wars, so they weren’t particularly interested in playing nice. Ultimately, ECMAScript 4 never came to be.&lt;/p&gt;

&lt;p&gt;The browser cold war continued for several years. Caught in the middle were developers who had to either build two sets of websites (one for JavaScript and one for JScript) or ask users to view their site on a specific browser.&lt;/p&gt;

&lt;h1&gt;
  
  
  Developers Rise Up!
&lt;/h1&gt;

&lt;p&gt;Despite being neglected by the big companies, it was developers who came to JavaScript’s rescue. It all started with a now-famous &lt;a href="https://web.archive.org/web/20190226075734/https://adaptivepath.org/ideas/ajax-new-approach-web-applications/"&gt;blog post&lt;/a&gt; from a designer / developer named Jesse James Garrett. He introduced the world to a concept called Ajax (Asynchronous JavaScript + XML). The essence of the idea was that in the browser you could separate the fetching of the data from the presentation of that data. This enabled a much better experience for the user. No longer would they have to see a blank page and hourglass loading icon every time they clicked on a link. The concept behind Ajax was pretty simple:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wzw4buTy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1old68jnbelw1tiacjwk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wzw4buTy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1old68jnbelw1tiacjwk.png" alt="Alt Text" width="880" height="696"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Diagram from the original blog post&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Now asynchronous web applications are completely the norm, but in 2005 this was revolutionary!&lt;/p&gt;

&lt;p&gt;Jesse James Garrett had opened the floodgates. Developers started building all kinds of sophisticated JS tools and frameworks. Most notably is JQuery which enables tons of things including easy DOM manipulation and Ajax requests. While the big companies squabbled, developers just got on with building great stuff. Decentralization for the win!&lt;/p&gt;

&lt;h1&gt;
  
  
  The New Kids on the Block
&lt;/h1&gt;

&lt;p&gt;Two guys, who happened to run a company called Google, took an interest in web browsers. Larry Page and Sergey Brin hired some engineers who had worked at Netscape (and then its spin-off Mozilla) to build a new browser. Larry and Sergey showed it to their boss / babysitter Eric Schmidt who was impressed. They assigned an up-and-coming young star at Google, Sundar Pichai, to run with the idea.&lt;/p&gt;

&lt;p&gt;In 2008, Google released Chrome. The real hero in the story is the V8 engine that powers Chrome. The V8 engine outperformed the engines in all the other browsers. It showed the world that highly-performant applications could be written for the browser in JavaScript.&lt;/p&gt;

&lt;p&gt;Ryan Dahl saw the power of the V8 engine and used it to create NodeJS which enabled developers to write web servers &lt;strong&gt;in JavaScript&lt;/strong&gt;. Now with just JavaScript, developers could build the whole stack for an app.&lt;/p&gt;

&lt;h1&gt;
  
  
  A New Beginning
&lt;/h1&gt;

&lt;p&gt;JavaScript was too important and too popular to be neglected by the big companies any longer. They came together to finally agree upon one standard. This was ECMAScript 5. Almost 10 years after ECMAScript 4 was proposed, ECMAScript 5 was accepted as the standard and all the major browsers implemented support for it.&lt;/p&gt;

&lt;p&gt;The reach and scale of the internet was continuing to grow and now JavaScript was firmly and indisputably attached to that rocketship. The result is that developers built even more stuff in JavaScript. Here’s a comparison of the number of packages built for major programming languages. The number of NodeJS packages just grows at another level:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uFnXDQMY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cc4jm9afr3060i56a6ql.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uFnXDQMY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cc4jm9afr3060i56a6ql.png" alt="Alt Text" width="719" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Among those packages are things like React, Redux, Vue, and Angular. The vast majority of web developers today use at least one of those frameworks to build web apps.&lt;/p&gt;

&lt;p&gt;And to think that at the beginning, JavaScript was supposed to be a little scripting language. Look at how far the little language has come!&lt;/p&gt;

&lt;h1&gt;
  
  
  The JavaScript Future is Bright
&lt;/h1&gt;

&lt;p&gt;Big companies and individual developers continue to build JS tools and frameworks. WebAssembly (WASM) provides a high-performance complement to JavaScript. TypeScript elegantly adds typing to JavaScript while still enabling people to write Vanilla JS.&lt;/p&gt;

&lt;p&gt;JavaScript’s uses may change in the future but it seems poised to continue to be an essential part of building modern web applications. Its future seems as bright as its past was interesting.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LmN1CHlx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/enkyg02l8nmq20w2gwgl.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LmN1CHlx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/enkyg02l8nmq20w2gwgl.jpeg" alt="Alt Text" width="880" height="660"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Marc Andreessen today looking at the bright future of JS that he helped create&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Do you want feedback on your JavaScript code?
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Do you want to help other people get better at JavaScript?
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Come join our code review Slack group!
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Just click the link at the top of our landing page: &lt;a href="https://antcode.dev"&gt;https://antcode.dev&lt;/a&gt;.
&lt;/h3&gt;




&lt;p&gt;&lt;strong&gt;Sources &amp;amp; further reading&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/JavaScript"&gt;JavaScript Wikipedia Page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://auth0.com/blog/a-brief-history-of-javascript/"&gt;Auth0 History of JavaScript&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=Sh6lK57Cuk4"&gt;Fireship’s Weird History of JavaScript&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.amazon.com/How-Internet-Happened-Netscape-iPhone/dp/1631493078/ref=sr_1_3?dchild=1&amp;amp;keywords=history+of+the+internet&amp;amp;qid=1600038200&amp;amp;sr=8-3#ace-6796040015"&gt;How The Internet Happened by Brian McCollough&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Image sources (in order of appearance)&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.thocp.net/biographies/andreesen_marc.htm"&gt;One&lt;/a&gt;, &lt;a href="https://www.zdnet.com/article/mosaics-birthday-25-years-of-the-modern-web/"&gt;two&lt;/a&gt;, &lt;a href="http://content.time.com/time/covers/0,16641,19960219,00.html"&gt;three&lt;/a&gt;, &lt;a href="https://giphy.com/gifs/happy-fathers-day-fathersday-YEL7FJP6ed008"&gt;four&lt;/a&gt;, &lt;a href="https://www.nndb.com/people/095/000031002/"&gt;five&lt;/a&gt;, &lt;a href="https://ally-marketing.com/effective-marketing-plan-elements/"&gt;six&lt;/a&gt;, &lt;a href="https://www.thegentlemansjournal.com/bill-gates-life-in-pictures/"&gt;seven&lt;/a&gt;, &lt;a href="https://www.nytimes.com/2019/11/02/opinion/sunday/switzerland-capitalism-wealth.html"&gt;eight&lt;/a&gt;, &lt;a href="https://immagic.com/eLibrary/ARCHIVES/GENERAL/ADTVPATH/A050218G.pdf"&gt;nine&lt;/a&gt;, &lt;a href="https://medium.com/javascript-scene/how-popular-is-javascript-in-2019-823712f7c4b1"&gt;ten&lt;/a&gt;, and &lt;a href="https://www.businessinsider.com/marc-andreessen-blames-america-coronavirus-failures-build-2020-4"&gt;eleven&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>A Perhaps-Too-Simple Guide to Git</title>
      <dc:creator>Otto Nagengast</dc:creator>
      <pubDate>Sat, 05 Sep 2020 05:20:19 +0000</pubDate>
      <link>https://dev.to/o_nagen11/a-perhaps-too-simple-guide-to-git-1052</link>
      <guid>https://dev.to/o_nagen11/a-perhaps-too-simple-guide-to-git-1052</guid>
      <description>&lt;p&gt;For probably my first year writing code, I used Git like I take a multivitamin: I was told I should do it, but I didn’t really understand how it works and I only vaguely understood the benefits. Unsurprisingly, I made a ton of Git mistakes. Running ‘git rebase’ was terrifying. There were many times when I sat down to bang out some code and hours later, I was still going line by line fixing merge conflicts wondering what the hell just happened. &lt;/p&gt;

&lt;p&gt;But little by little, I started understanding Git. I even came to appreciate it. It is an amazing piece of technology. Although it is highly sophisticated, it is useful and accessible to even beginner developers. You can find lots of beginner guides out there to using Git. You can find lots of guides that define the key terms. &lt;strong&gt;In this post, I want to focus on giving you the intuition you need to confidently use Git.&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Why is Git useful?
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Git really does just 2 things. It tracks changes to a set of code and it enables people to manage those changes.&lt;/strong&gt; Based on that core functionality, Git offers 2 primary benefits: time travel and collaboration. &lt;/p&gt;

&lt;h2&gt;
  
  
  Time travel
&lt;/h2&gt;

&lt;p&gt;Over time, a codebase changes. New features are added. Bugs are fixed. Parts are rewritten (or “refactored” as developers like to call it). Ideally, all these changes are positive. But sometimes they are not. Let’s say you unintentionally introduced a bug into your code and now things are seriously broken. You have 2 options. You could write more code to fix it. Or you could just undo the broken code that you added; you could just go back in time to when your code didn’t have that bug. With Git that is as easy as running one command. This isn’t a hack. Huge companies use Git to undo changes to products that millions of people use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Collaboration
&lt;/h2&gt;

&lt;p&gt;Changes happen over time and they also happen between people working on the same codebase. Git enables you to track and manage changes that different people make to the same codebase. If you have even one collaborator on a project, this benefit becomes evident immediately. &lt;/p&gt;

&lt;h1&gt;
  
  
  What is Git?
&lt;/h1&gt;

&lt;p&gt;I think definitions are important, so let’s look at the official definition from &lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;the Git homepage&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.&lt;/p&gt;

&lt;p&gt;Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There’s clearly lots of advantages to Git. It’s free, open source, fast, efficient, small, and it works with any size project -- all great! But there are also some things in that definition that maybe weren’t so obvious. One of them may have been “SCM”.&lt;/p&gt;

&lt;p&gt;I’ll admit, I had to Google it. The first result on Google didn’t seem right:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdc78ua5scfu3o6xpav58.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdc78ua5scfu3o6xpav58.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So I tried “what does CSM mean” and that also did not work:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx7lm6nvp4l02c49ymr5r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx7lm6nvp4l02c49ymr5r.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, I tried “what does CSM mean git” and got what I was looking for:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fltxzx5pe6yrtb054uvfh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fltxzx5pe6yrtb054uvfh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No surprises there, hopefully. It should make sense by now that Git is a source code management tool. It turns out that there are other SCMs out there too. Git is actually only 15 years old. SCM tools had existed for decades before Git came along. Apparently they just weren’t that great. Linus Torvalds decided to &lt;a href="https://twobithistory.org/2018/07/07/cvs.html#:~:text=You%20have%20almost%20certainly%20heard,distributed%E2%80%9D%20version%20control%20system%20before.&amp;amp;text=CVS%2C%20short%20for%20Concurrent%20Versions,replaced%20in%202000%20by%20Subversion" rel="noopener noreferrer"&gt;make a better one&lt;/a&gt; and that became Git. (By the way, Linus also created Linux and maintained it for many years -- what a legend).&lt;/p&gt;

&lt;p&gt;Another key term from the definition is “distributed version control system”. The “distributed” part in particular is what really sets Git apart. In practice, one of the things it means is that each person working on a codebase keeps a full version on their own computer. A big benefit of this is that it is much faster to work on the code because you don’t have to be constantly in sync with a central server. There are a lot more benefits to a distributed version control system, and you can read about them &lt;a href="https://en.wikipedia.org/wiki/Distributed_version_control" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  How do you actually use Git?
&lt;/h1&gt;

&lt;p&gt;As I said before, there are tons of guides out there about the commands you need to run to use Git. &lt;a href="https://rogerdudler.github.io/git-guide/" rel="noopener noreferrer"&gt;This one&lt;/a&gt; is a good example. &lt;strong&gt;Here I’m instead going to focus on giving you an intuitive understanding of the concepts so that you can understand when to use those commands and what they are doing.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Concept #1: Git is silently monitoring your files.
&lt;/h2&gt;

&lt;p&gt;I think of Git like a courtroom stenographer. It sits there silently in the background just recording all the changes you make to your code. It only “speaks up” when you ask it for something. You can ask it to show you the changes or you can tell it to do something with those changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Concept #2: Remote and local repositories
&lt;/h2&gt;

&lt;p&gt;In any Git project there are two versions of the same repository: the remote repo and the local repo. The remote repo lives on some remote server (i.e. “the cloud”). These days, that remote server is probably GitHub, GitLab, or Bitbucket. Your local repo is a copy of the same code that is in the remote repo, but the local repo is stored on your computer. &lt;strong&gt;When you’re working with Git, one of the main things you’ll be doing is keeping the remote repo in sync with your local repo and vice-versa.&lt;/strong&gt; I’ll elaborate. Let’s say you’re adding a new feature. You will make changes to your local repo. Once you’re finished, you will then push these changes to the remote repo. Everyone else on the project can then pull these changes so that their local repo is up to date with the remote repo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Concept #3: The commit
&lt;/h2&gt;

&lt;p&gt;We organize human history by years. The Magna Carta was written in 1215. The US was founded in 1776. You are X number of years old.&lt;br&gt;
We organize a codebase’s history by commit. This feature was added in “commit ABC”. That bug was introduced in “commit XYZ”. The latest stable version is “commit JKL”.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A commit is a snapshot of the current state of the codebase.&lt;/strong&gt; When a change is made, there is a new current state of the codebase, and this new current state is captured in a new commit. That’s the cycle, over and over: commit + changes = new commit.&lt;br&gt;
These commits form a timeline of the project. This timeline is called the “git history”.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Concept #4: The branch
&lt;/h2&gt;

&lt;p&gt;At any point in time, any number of things could happen. You could go eat some food. You could call a friend. You could close your laptop. In other words, branching out from this point in time are many possible futures.&lt;/p&gt;

&lt;p&gt;The same intuition applies to Git. From any one commit in Git, there are many possible futures. Maybe the background of the new page could have been green instead of blue. Maybe you use TypeScript instead of JavaScript. Each of these possible futures would be contained in a branch.&lt;/p&gt;

&lt;p&gt;When you’re working with other people, this branching feature becomes especially useful. Let’s say you want to add a new feature. You would get the latest version of the codebase. The convention is that the main version of a codebase is stored on a branch named “master”. So to be more precise, you will get the latest commit on the master branch. You create a new branch off that commit and start implementing your feature. Once you’re done, you create a new commit and add that commit to the master branch.&lt;/p&gt;

&lt;p&gt;What if while you were working on that feature your boss comes to you and asks you to fix a small bug? You can just create a new branch from the latest master commit, fix the bug, create a new commit, and add it to the master branch. Then you can just go back to the branch you were building the new feature on and pick up where you left off.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The pattern is the same over and over. You create a branch off of the latest commit in the master branch, make changes, create a new commit, and then add that commit to the master branch.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that you have the intuition, let me just clarify 2 terms that you will come across a lot. The first is “merging.” When you add a commit from your branch to the master branch, what actually happens is that your branch is “merged” into the master branch. It’s like two roads merging into one. Your branch becomes the master branch, just like the one road becomes the other road. This analogy is not perfect though because your branch doesn’t actually disappear automatically. What is really happening is that the contents of your branch are copied and merged with the contents of the master branch. Your branch and its contents will still exist until you delete them.&lt;/p&gt;

&lt;p&gt;The other term is “pull request,” and it is far less intuitive than merging. If you’re working on a codebase with other people, you probably won’t be allowed to just add a commit to the master branch, especially if you’re working at a company. Instead, you make a request to add your commit. Someone else reviews it, makes sure everything looks good, and then they merge your branch into the master branch and your commit is added.&lt;/p&gt;

&lt;p&gt;In GitHub this request is called a “pull request”. This is weird. You &lt;em&gt;pull&lt;/em&gt; changes from the remote repo and &lt;em&gt;push&lt;/em&gt; changes to the remote repo. This is how naturally everyone describes it. When you submit a request like this, in your mind, you say “I am requesting to push these changes into master.” Therefore, I think it’s more intuitive to call a “pull request” a “push request”. But the logic GitHub uses is that you are requesting that your changes be pulled into master. That’s why it’s called a “pull request”. GitLab, probably GitHub’s main competitor, actually calls these requests “merge requests” which makes a lot more sense to me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Concept #5: Git can find differences.
&lt;/h2&gt;

&lt;p&gt;This is where Git starts to amaze. Just storing snapshots of the state of the repo isn’t that impressive. &lt;strong&gt;But Git can determine the differences between 2 snapshots.&lt;/strong&gt; This is impressive.&lt;/p&gt;

&lt;p&gt;Recall that a git history is just a chain of commits. This is useful but this is like knowing just dates on a timeline. For example, World War I started in 1914. Then World War II started in 1939. But how did we go from one world war to another one? Why did a second world war happen just 25 years after the first one ended? To answer these questions, we need to look at how things changed in between those two points in time.&lt;/p&gt;

&lt;p&gt;The same intuition applies to the history of your codebase. Git can find the differences between two commits, so it can tell you what changed between one commit and the next. With Git, you can easily see how the codebase changed over time.&lt;/p&gt;

&lt;p&gt;This difference-finding functionality has all kinds of uses. When you create a pull request (merge request), Git will determine the differences between your commit and the latest commit on the master branch. GitHub (and the other products) display these differences in a UI. If you’re reviewing code, you only have to look at what changed. Another common use is to find bugs. If you know when a bug appeared, you can compare two commits to see the precise code that introduced it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Concept #6: Merge conflicts
&lt;/h2&gt;

&lt;p&gt;If you’ve had bad experiences with Git, it’s likely because of merge conflicts. They have caused developers to use more bad words than perhaps anything else. The thing with merge conflicts, however, is that Git has to have them. Even if Git could read your mind, they couldn’t be eradicated completely. This will make sense shortly.&lt;/p&gt;

&lt;p&gt;Imagine you’ve been working on a new feature in a branch called: “new-buttons”. Yesterday, your collaborator added a new commit to the master branch. Before you keep working on your feature, you want to make sure that you are working with the latest version of the code. To do this, you have to do the following: You pull the latest commit from the master branch on the remote repo. Now your local version of master is up-to-date with the remote one. Now you need to merge this up-to-date version of master into the “new-buttons” branch you’ve been working on. Let’s pause for a moment. These steps may be unfamiliar but if you’ve read this far, you should have the intuition to understand them. If they don’t make sense yet, reread the paragraph, think about it some more, and if you’re still not getting it, just ask in the comments and I’ll be happy to help :-)&lt;/p&gt;

&lt;p&gt;You merge the master branch into your “new-buttons” branch — and there are merge conflicts. Why? &lt;strong&gt;You touched the same code that your colleagues touched in their commits.&lt;/strong&gt; Let’s get some intuition for why this is a problem. Remember that branches are like alternate futures branching out from one point in time. In one of those alternate futures, you have short hair on November 23, 2030. In another one, you have long hair on that date. But in any one future / branch, you can’t have both. If you tried to combine those two possible futures, if you tried to merge those two branches, you would have to pick: Will you have short or long hair?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When there is a merge conflict Git is telling you, “You need to pick.”&lt;/strong&gt; Let’s say both you and your collaborator changed the background color of the app. When you try to merge their changes into your branch, Git will raise a merge conflict and ask you to resolve it by picking either your version or your collaborator’s version of the conflicting code. Git doesn’t know which one you want to use. Maybe you don’t even know! Maybe you need to call a meeting and make a decision with your collaborator. Thanks to Git, you know that you and your collaborator have incompatible versions of the future and that you need to fix this.&lt;/p&gt;

&lt;p&gt;Merge conflicts can be avoided by making sure that no two developers touch the same piece of code. Because merge conflicts are so annoying, and can require a lot of work to resolve, developers go to great lengths to stay organized and coordinate work between one another in order to avoid them. However, in practice merge conflicts are nearly impossible to avoid if there is more than one person working on a project. Thankfully Git not only clearly flags the conflicts, but it also makes it easy to pick the versions of the code you want to use in order to resolve them. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I hope you now have some good intuition about Git that will help you have a better experience working with it. From here, I would suggest jumping into particular commands and workflows in Git. You could start with &lt;a href="https://dev.to/chrisachard/confused-by-git-here-s-a-git-crash-course-to-fix-that-4cmi"&gt;this great article&lt;/a&gt; that goes in-depth on the main parts. I would encourage you to think about what each command and series of commands is actually doing so that you can continue building your intuition.&lt;/p&gt;

&lt;p&gt;Good luck and happy coding!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cover photo credit: Caleb Jones on Unsplash&lt;/em&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
