<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">
	<channel>
		<title>Author at Infinum</title>
		<atom:link href="https://infinum.com/blog/author/mihael-safaric/feed/" rel="self" type="application/rss+xml" />
		<link></link>
		<description>Building digital products</description>
		<lastBuildDate>Fri, 03 Apr 2026 12:58:20 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>

					<item>
				<image>
					<url>7997https://infinum.com/uploads/2017/02/things-to-not-avoid-when-writing-css-0.gif</url>
				</image>
				<title>Things to NOT Avoid When Writing CSS</title>
				<link>https://infinum.com/blog/things-to-not-avoid-when-writing-css/</link>
				<pubDate>Thu, 05 Nov 2015 06:39:00 +0000</pubDate>
				<dc:creator>Mihael Šafarić</dc:creator>
				<guid isPermaLink="false">https://infinum.com/the-capsized-eight/things-to-not-avoid-when-writing-css/</guid>
				<description>
					<![CDATA[<p>A blog post about things to avoid when writing CSS caught our attention a few days ago. We beg to differ on some of the points raised.</p>
<p>The post <a href="https://infinum.com/blog/things-to-not-avoid-when-writing-css/">Things to NOT Avoid When Writing CSS</a> appeared first on <a href="https://infinum.com">Infinum</a>.</p>
]]>
				</description>
				<content:encoded>
					<![CDATA[<div
	class="wrapper"
	data-id="es-178"
	 data-animation-target='inner-items'>
		
			<div class="wrapper__inner">
			<div class="block-blog-content js-block-blog-content">
	
<div class="block-blog-content-sidebar" data-id="es-92">
	</div>

<div class="block-blog-content-main">
	
<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-95"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-93">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-94'
	>
	A blog post titled <a href="https://medium.com/@Heydon/things-to-avoid-when-writing-css-1a222c43c28f#.mr0486xku">Things To Avoid When Writing CSS</a> caught our attention a few days ago. We appreciate the author’s point of view, but we just couldn’t bring ourselves to agree on all the points raised.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-98"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-96">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-97'
	>
	We thought it would be useful if we shared our experience and views on how to write efficient and maintainable CSS.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-101"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-99">
	<h2	class='typography typography--size-52-default js-typography block-heading__heading'
	data-id='es-100'
	>
	Multiple CSS files</h2></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-104"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-102">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-103'
	>
	A CSS file is an ordered set of rules, so when writing CSS, a developer should always pay attention to the order of the rules.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-107"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-105">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-106'
	>
	Even a small project can rely on a CSS file that can grow quite large. As the project grows, the CSS file becomes bigger and bigger. Eventually, keeping track of all those rules becomes hard, and even a small change becomes fertile ground for your baldness.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-110"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-108">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-109'
	>
	While writing HTML or JavaScript, you organize it in multiple files. You should follow the same principle while writing CSS. It’s easier to find related information as it is grouped in separate files. Also, when a versioning system is used, more people are able to work on the project with less merge conflicts.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-113"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-111">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-112'
	>
	As for the specificity argument, if a rule depends on another rule, both of them need to be in the same file. In that way, it’s easy for you to manage that dependency.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-116"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-114">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-115'
	>
	You should always be aware that your files will generate one big CSS file and that, in some cases, the order of CSS files is crucial.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-119"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-117">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-118'
	>
	As a rule of thumb, we try to keep our SASS files under 200 lines of code with optimal length of around 100 lines per file. Also, complicated blocks that have over 50 lines of code should go into separate files.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-122"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-120">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-121'
	>
	From our experience, the modularization of CSS pays off even in cases when a single developer works on the project. Furthermore, the benefits of modularization increase with more developers working together.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-125"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-123">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-124'
	>
	<strong>Summary:</strong> Split your CSS code into different files and then use one main file to manage the loading order. Be wary of specificity as you would be if it was all in one file. Keep individual files under 200 LOC.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-128"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-126">
	<h2	class='typography typography--size-52-default js-typography block-heading__heading'
	data-id='es-127'
	>
	Nesting (with SASS)</h2></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-131"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-129">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-130'
	>
	Nesting improves code readability and eliminates duplication. Most problems with nesting come from not understanding what the generated CSS will look like.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-134"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-132">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-133'
	>
	That being said, there’s no good excuse for not using it. Someone who writes SASS code with obnoxiously deep nesting would probably also write lousy non-nested CSS. For them, nesting is just another tool to shoot themselves in the foot.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-137"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-135">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-136'
	>
	We use <a href="http://getbem.com/introduction/">BEM methodology</a> and keep our nesting no more than three levels deep. There are some exceptions where we use four levels of nesting. This keeps our generated CSS code relatively flat.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-140"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-138">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-139'
	>
	<strong>Summary:</strong> Nesting in SASS is NOT inherently a bad thing and you should use it. However, in general, it should be no more than three levels deep.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-143"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-141">
	<h2	class='typography typography--size-52-default js-typography block-heading__heading'
	data-id='es-142'
	>
	Pixel units</h2></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-146"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-144">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-145'
	>
	Using measurement units other than pixels is great, but you just can’t use them for some designs. There is a reason why it’s called <strong>pixel perfect</strong>. A designer has a vision of what the design should look like. By using pixel measurements, a developer has full control over the sizes, which is sometimes necessary.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-149"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-147">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-148'
	>
	This doesn’t mean that you shouldn’t use relative measurement units (em, rem, %, etc.). They are useful and powerful for elements that change depending on the screen size.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-152"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-150">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-151'
	>
	<strong>Summary:</strong> Using relative units of measurement is great, but they aren’t applicable to every metric in your CSS.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-155"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-153">
	<h2	class='typography typography--size-52-default js-typography block-heading__heading'
	data-id='es-154'
	>
	Device breakpoints</h2></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-158"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-156">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-157'
	>
	This is actually the part of the article we agree on the most. There are many different devices with different screen sizes and, of course, you won’t have breakpoints for every single one of them.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-161"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-159">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-160'
	>
	<strong>Summary:</strong> Determine the number of breakpoints based on the design. A few breakpoints are usually enough.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-164"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-162">
	<h2	class='typography typography--size-52-default js-typography block-heading__heading'
	data-id='es-163'
	>
	Conclusion</h2></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-167"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-165">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-166'
	>
	CSS is <strong>not a programming language</strong> (rather a stylesheet language), but there are a lot of <strong>good programming practices</strong> from other languages we can learn from and apply them to CSS.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-170"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-168">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-169'
	>
	Also, there are plenty of tools today that help us write cleaner CSS with less “I want to kill myself” moments. By using these modern techniques/rules/guides/tools, our CSS becomes cleaner, maintainable and easier to work with.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-173"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-171">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-172'
	>
	The key is <strong>understanding</strong> what is going on with your code, how the language works behind the scenes, and what <strong>your code will generate</strong>. After that, situations like Peter’s will be less frequent.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-176"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-media">
	<div	class="media block-media__media media__border--none media__align--center-center"
	data-id="es-174"
	 data-media-type='image'>

	<figure class="image block-media__image-figure image--size-stretch" data-id="es-175">
	<picture class="image__picture block-media__image-picture">
												<img
					src="https://infinum.com/uploads/2017/02/things-to-not-avoid-when-writing-css-1.gif"
					class="image__img block-media__image-img"
					alt=""
										height="345"
															width="460"
										loading="lazy"
					 />
					</picture>

			<figcaption class="image__figcaption block-media__image-figcaption">
			Peter is having a great time		</figcaption>
	</figure></div></div>	</div>
</div>
</div>		</div>
	</div><p>The post <a href="https://infinum.com/blog/things-to-not-avoid-when-writing-css/">Things to NOT Avoid When Writing CSS</a> appeared first on <a href="https://infinum.com">Infinum</a>.</p>
]]>
				</content:encoded>
			</item>
					<item>
				<image>
					<url>8005https://infinum.com/uploads/2015/07/learn-javascript-by-building-your-own-jquery-0.webp</url>
				</image>
				<title>Learn JavaScript by Building Your Own JQuery</title>
				<link>https://infinum.com/blog/learn-javascript-by-building-your-own-jquery/</link>
				<pubDate>Thu, 09 Jul 2015 00:10:00 +0000</pubDate>
				<dc:creator>Mihael Šafarić</dc:creator>
				<guid isPermaLink="false">https://infinum.com/the-capsized-eight/learn-javascript-by-building-your-own-jquery/</guid>
				<description>
					<![CDATA[<p>LearnQuery will launch you on a wild adventure where you will learn how to use JS swords. Swords? Yeah, swords! You&#8217;ll find them, believe me.</p>
<p>The post <a href="https://infinum.com/blog/learn-javascript-by-building-your-own-jquery/">Learn JavaScript by Building Your Own JQuery</a> appeared first on <a href="https://infinum.com">Infinum</a>.</p>
]]>
				</description>
				<content:encoded>
					<![CDATA[<div
	class="wrapper"
	data-id="es-284"
	 data-animation-target='inner-items'>
		
			<div class="wrapper__inner">
			<div class="block-blog-content js-block-blog-content">
	
<div class="block-blog-content-sidebar" data-id="es-179">
	</div>

<div class="block-blog-content-main">
	
<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-182"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-180">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-181'
	>
	So you heard that JavaScript is the best programming language and you’ve decided to become a JavaScript Warrior? LearnQuery will launch you on a wild adventure where you will learn how to use JS swords. Swords? Yeah, swords! You’ll find them, believe me. It’s an adventure after all.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-185"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-183">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-184'
	>
	Maybe you’ve wanted to learn JavaScript but have only had bad experiences with simple tutorials that you complete without putting much thought into and that don’t end up teaching you anything except syntax? If this is the case – you’re in the right place.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-188"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-186">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-187'
	>
	The story is this – we wanted to train new JavaScript developers in the best possible manner. We wanted a <strong>standard learning path</strong> to learn quality JavaScript development. We looked around, couldn’t find a solution for our problem – and so decided to scratch our own itch and create one ourselves.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-191"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-189">
	<h2	class='typography typography--size-36-text js-typography block-heading__heading'
	data-id='es-190'
	>
	Everybody knows jQuery</h2></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-194"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-192">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-193'
	>
	If you’re a web developer, chances are you’re familiar with jQuery. Most developers know how to use the popular library, but a very small fraction of them know <strong>how jQuery really works internally</strong>. This was our starting point – to teach JavaScript and jQuery at the same time. And so, <strong>learnQuery</strong> was born.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-197"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-195">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-196'
	>
	<a href="https://github.com/infinum/learnQuery">LearnQuery</a> is an open source learning exercise that teaches developers the basics of JavaScript by building their own jQuery clone.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-200"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-media">
	<div	class="media block-media__media media__border--none media__align--center-center"
	data-id="es-198"
	 data-media-type='image'>

	<figure class="image block-media__image-figure image--size-stretch" data-id="es-199">
	<picture class="image__picture block-media__image-picture">
								
			<source
				srcset=https://infinum.com/uploads/2015/07/learn-javascript-by-building-your-own-jquery-1-1400x755.webp				media='(max-width: 699px)'
				type=image/webp								height="755"
												width="1400"
				 />
												<img
					src="https://infinum.com/uploads/2015/07/learn-javascript-by-building-your-own-jquery-1.webp"
					class="image__img block-media__image-img"
					alt=""
										height="1035"
															width="1920"
										loading="lazy"
					 />
					</picture>

			<figcaption class="image__figcaption block-media__image-figcaption">
			 Welcome to the Infinum JavaScript team lad. Shall we begin?		</figcaption>
	</figure></div></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-203"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-201">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-202'
	>
	It was developed with the main objective of imparting a strong JavaScript foundation that allows simple and fast mastering of complicated JavaScript concepts. The final product is your own jQuery clone, with a subset of functionality that the actual jQuery has. The main purpose of completing this exercise is that afterwards you’ll have a pretty good impression of how jQuery works under the hood.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-206"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-204">
	<h3	class='typography typography--size-36-text js-typography block-heading__heading'
	data-id='es-205'
	>
	LearnQuery structure</h3></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-209"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-207">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-208'
	>
	In order to successfully solve learnQuery, a student is expected to have a basic knowledge of programming.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-212"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-210">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-211'
	>
	LearnQuery is divided into a number of tasks and gradually introduces core JavaScript concepts. The tasks become more challenging as one progresses and by passing through them a student is forced to constantly acquire new knowledge that builds on what was learned in previous tasks.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-215"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-213">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-214'
	>
	Each task has its own folder with the following structure:</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-217"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-code">
	<pre class="phiki language-php github-light" data-language="php" style="background-color: #fff;color: #24292e;"><code><span class="line"><span class="token">    </span><span class="token" style="color: #005cc5;">00</span><span class="token" style="color: #d73a49;">.</span><span class="token" style="color: #005cc5;">example</span><span class="token">:</span><span class="token"> 
</span></span><span class="line"><span class="token">        </span><span class="token" style="color: #005cc5;">–</span><span class="token"> </span><span class="token" style="color: #005cc5;">spec</span><span class="token">
</span></span><span class="line"><span class="token">            </span><span class="token" style="color: #005cc5;">example</span><span class="token" style="color: #d73a49;">.</span><span class="token" style="color: #005cc5;">js</span><span class="token">
</span></span><span class="line"><span class="token">        </span><span class="token" style="color: #005cc5;">–</span><span class="token"> </span><span class="token" style="color: #005cc5;">src</span><span class="token">
</span></span><span class="line"><span class="token">            </span><span class="token" style="color: #005cc5;">example</span><span class="token" style="color: #d73a49;">.</span><span class="token" style="color: #005cc5;">js</span><span class="token">
</span></span><span class="line"><span class="token">        </span><span class="token" style="color: #005cc5;">runner</span><span class="token" style="color: #d73a49;">.</span><span class="token" style="color: #005cc5;">html</span><span class="token"> 
</span></span></code></pre></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-220"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-218">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-219'
	>
	The <strong>src</strong> folder contains a .js file in which a student must write a function to perform the requested task.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-223"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-221">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-222'
	>
	The <strong>spec</strong> folder contains a .js file which applies specs to the written function. Students are encouraged to write several specs on their own.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-226"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-224">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-225'
	>
	The specs are written using the <a href="http://jasmine.github.io/">Jasmine</a> framework for testing JavaScript code.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-229"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-227">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-228'
	>
	LearnQuery contains the following tasks:</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-232"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="lists" data-id="es-230">
	<ul	class='typography typography--size-16-text-roman js-typography lists__typography'
	data-id='es-231'
	>
	<li>Simple selector</li></ul></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-235"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="lists" data-id="es-233">
	<ul	class='typography typography--size-16-text-roman js-typography lists__typography'
	data-id='es-234'
	>
	<li>CSS manipulation</li><li>CSS class manipulation</li><li>DOM manipulation</li><li>AJAX request</li><li>Event listeners<ul><li>Additional event listener trigger</li><li>Event delegation</li></ul></li><li>Make learnQuery</li></ul></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-238"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-236">
	<h3	class='typography typography--size-36-text js-typography block-heading__heading'
	data-id='es-237'
	>
	Solving learnQuery</h3></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-241"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-239">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-240'
	>
	One example task of medium difficulty is provided, and has already been solved. This task introduces basic JavaScript concepts that are applied in subsequent tasks.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-244"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-242">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-243'
	>
	Tasks are described with very little or no text at all (just a function definition). Student’s functions must behave just like corresponding jQuery functions.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-247"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-245">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-246'
	>
	The goal is to encourage students to do research on their own. Additionally, a student can review the given specs, and from the test descriptions they should be able to deduce how a function should behave.<br>Jasmine syntax is obvious, so it’s easy to learn and specs are easy to read. For example:</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-249"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-code">
	<pre class="phiki language-javascript github-light" data-language="javascript" style="background-color: #fff;color: #24292e;"><code><span class="line"><span class="token">    </span><span class="token" style="color: #6f42c1;">it</span><span class="token">(</span><span class="token">’</span><span class="token" style="color: #24292e;">should</span><span class="token"> </span><span class="token" style="color: #24292e;">cover</span><span class="token"> </span><span class="token" style="color: #24292e;">small</span><span class="token"> </span><span class="token" style="color: #24292e;">numbers</span><span class="token">’</span><span class="token">,</span><span class="token"> </span><span class="token" style="color: #d73a49;">function</span><span class="token">(</span><span class="token">)</span><span class="token"> </span><span class="token">{</span><span class="token">
</span></span><span class="line"><span class="token">        </span><span class="token" style="color: #6f42c1;">expect</span><span class="token">(</span><span class="token" style="color: #24292e;">fibonacciCalculator</span><span class="token">.</span><span class="token" style="color: #6f42c1;">compute</span><span class="token">(</span><span class="token" style="color: #005cc5;">0</span><span class="token">)</span><span class="token">)</span><span class="token">.</span><span class="token" style="color: #6f42c1;">toBe</span><span class="token">(</span><span class="token" style="color: #005cc5;">1</span><span class="token">)</span><span class="token">;</span><span class="token">
</span></span><span class="line"><span class="token">        </span><span class="token" style="color: #6f42c1;">expect</span><span class="token">(</span><span class="token" style="color: #24292e;">fibonacciCalculator</span><span class="token">.</span><span class="token" style="color: #6f42c1;">compute</span><span class="token">(</span><span class="token" style="color: #005cc5;">1</span><span class="token">)</span><span class="token">)</span><span class="token">.</span><span class="token" style="color: #6f42c1;">toBe</span><span class="token">(</span><span class="token" style="color: #005cc5;">1</span><span class="token">)</span><span class="token">;</span><span class="token">
</span></span><span class="line"><span class="token">    </span><span class="token">}</span><span class="token">)</span><span class="token">;</span><span class="token">
</span></span><span class="line"><span class="token">
</span></span></code></pre></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-252"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-250">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-251'
	>
	Writing your own specs is an important task because it encourages you to think about the corner cases.<br>By writing specs, a student discovers his bugs and gets familiar with debugging (the best way to learn is from your mistakes).</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-255"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-253">
	<h2	class='typography typography--size-36-text js-typography block-heading__heading'
	data-id='es-254'
	>
	Mentorship</h2></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-258"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-256">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-257'
	>
	LearnQuery can be solved without a help of a mentor, but internally, we assign a mentor to each student. A student writes his own specs which allows him to experience the full learnQuery potential. In the other words, a mentor is not necessary, but it’s recommended.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-261"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-259">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-260'
	>
	A mentor is a person who advises a student, teaches him good programming practices, and reviews his code. After a code review, a mentor will point out the flaws and/or propose a better solution.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-264"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-262">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-263'
	>
	A mentor covers the things that can’t be tested automatically, like, for example, code quality. Additionally, a mentor’s feedback will provide a student with valuable information that will help a student to progress rapidly from task to task.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-267"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-265">
	<h2	class='typography typography--size-36-text js-typography block-heading__heading'
	data-id='es-266'
	>
	Don’t give up</h2></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-270"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-268">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-269'
	>
	Solving learnQuery will probably induce emotional highs and lows. You might require an entire day to solve a very simple task. This is not wasted time, however, because it will help you gain very valuable experience.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-273"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-271">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-272'
	>
	<strong>Please do not give up!!!</strong></p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-276"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-274">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-275'
	>
	We believe that in the end you will definitely feel the effort is worth it. Solving LearnQuery will probably take a beginner student about two weeks.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-279"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-media">
	<div	class="media block-media__media media__border--none media__align--center-center"
	data-id="es-277"
	 data-media-type='image'>

	<figure class="image block-media__image-figure image--size-stretch" data-id="es-278">
	<picture class="image__picture block-media__image-picture">
												<img
					src="https://infinum.com/uploads/2015/07/learn-javascript-by-building-your-own-jquery-2.webp"
					class="image__img block-media__image-img"
					alt=""
										height="428"
															width="700"
										loading="lazy"
					 />
					</picture>

			<figcaption class="image__figcaption block-media__image-figcaption">
			 Influenced by: <a href="http://www.vikingcodeschool.com/posts/why-learning-to-code-is-so-damn-hard">Viking Code School Blog</a>		</figcaption>
	</figure></div></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-282"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-280">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-281'
	>
	LearnQuery is an open source project and is available on <a href="https://github.com/infinum/learnquery">GitHub</a>. </p></div>	</div>
</div>
</div>		</div>
	</div><p>The post <a href="https://infinum.com/blog/learn-javascript-by-building-your-own-jquery/">Learn JavaScript by Building Your Own JQuery</a> appeared first on <a href="https://infinum.com">Infinum</a>.</p>
]]>
				</content:encoded>
			</item>
		
	</channel>
</rss>