...array as a value in #where. ActiveRecord will make an IN() query: Card.where(id: [1,2,3]).to_sql # => SELECT * FROM cards WHERE id IN (1, 2, 3)

...FROM cards WHERE id > 5 Chaining multiple #where will AND the conditions: Card.where(id: [1,2,3]).where(title: 'Foo').to_sql # => SELECT * FROM cards WHERE id IN (1...

...it to console.log. Understand why each code block behaves the way it does: Variant 1: Iterating with forEach's callback function const callbacks = []; [1, 2, 3].forEach(function(i) { callbacks.push...

...callback) => callback()) Example 2: Incrementing a variable created with var const callbacks = []; var i = 1; while (i <= 3) { callbacks.push(function() { console.log(i) }) i++ } callbacks.forEach((callback) => callback()) Variant 3: Wrapping the...

makandra Curriculum

...Ruby: Get started with the greatest programming language made for humans. Note that chapters 16 (RDoc), 23 (Multi Threading) and everything after chapter 27 is irrelevant for now References

...lines and paragraphs, and outputs the result. For example: $ ruby count_words.rb test.txt test.txt has 123 words test.txt has 13 lines test.txt has 4 paragraphs Hint Find out about ARGV.

setTimeout() executes a function after some time. What does the following print in 1 second? Why? setTimeout(student.sayHello, 1000) What does the following print in 1 second? Why?

...function() { student.sayHello() }, 1000) What does the following print in 1 second? Why? setTimeout(student.sayHello.bind(student), 1000) Now we use another object: var student = { name: 'Anna', sayHello: function() { console.log("Hello, my...

...die Web Security 🇩🇪 provides essentials for the topic of this card. Read following chapters: (1) Security Principles (3.3) Sessions and Cookies (3.5) Same-Origin-Policy (4.2) Angriffsfläche / Attack Surface...

...Kryptographische Grundlagen (7) Authentifikation (8) Authorization (9) Session Management Ohne (9.4) JSON Web Tokens (10) Federation / Single-Sign on (11) Serverseitige Angriffe (12) Clientseitige Angriffe (13) Clientseitige Schutzmaßnahmen

...Read the following chapters from The Pragmatic Programmer, anniversary edition (in our library): Chapter 1, Topic 3: Software Entropy Chapter 2, Topic 9: The Evils of Duplication Chapter 2, Topic...

...10: Orthogonality Chapter 5, Topic 28: Decoupling (and the Law of Demeter) Read the following chapters from Clean Code (in our library): Chapter 1: Clean Code Chapter 2: Meaningful Names...

Why nouns from the client domain do not always map to Ruby models 1:1. E.g. although an "address book contact" and a "user" are both human beings, it...

makandra Curriculum

...distinction between virtual pixels vs. physical pixels. Understand how raster images prepared for a 1:1 pixel ratio look like on high density displays. Understand which classes of devices typically...

...skip the rest. Also skip deployment to Heroku and upload to AWS S3 everywhere. 1 From zero to deploy Introduction 1.1 Up and running 1.2 The first application

7.3 Unsuccessful signups 7.4 Successful signups 7.6 Conclusion 8 Basic login All chapters 13 User microposts All chapters except 13.4.4 Image upload in production For each chapter:

makandra Curriculum

# passes expect(movie1).to have_same_attributes_as(movie3) # Fails with 'Expected movie #112 to have same attributes as movie #113, but the attributes #title and #year differed'

...the setup's scope. describe Klass do describe '#foo' do it 'does basic thing 1' do # isolated test without shared setup here end it 'does basic thing 2' do # isolated...

...async function helperFunction() { console.log("second") await backgroundTask() console.log("third") } // Stub function that resolves after 100 milliseconds, could be an API call function backgroundTask() { return new Promise((resolve) => setTimeout(resolve, 100...

...should wait for the remaining milliseconds until the next second starts. For example, at 13:23 and 441 milliseconds, atFullSecond(1) should wait for 559 milliseconds before triggering the callback...

makandra Curriculum

...fully complete. Until then, we have to work with two versions. Concentrate on chapters: 1 (Introduction), 2 (Setting up RSpec), 3 (Model specs) and 4 (DRY enough specs) from the...

makandra Curriculum

...may need to re-run the test with a visible Chrome window (NO_HEADLESS=1). Note how you can even use the developer tools in the Selenium-controlled browser to...

...Twitter account just to follow accounts, you don't need to post. Hacker News 100: Tweeting Hacker News stories as soon as they reach 100 points. @IntentToShip: Early notifications when...

...multiple podcasts is Pocket Casts. It has free clients for Android and iOS. An 1€/month subscription gives you a web player. Working Draft Podcast INNOQ Podcast Geekstammtisch Podcast (with...

...to test it yourself. When you run your cucumber feature now with NO_HEADLESS=1 geordi cucumber, you should see a browser opening. Get someone to help you if this...

...invest more than a day to skim over the asset pipeline and webpacker. Rails 1-7 with the Asset Pipeline (Sprockets) The asset pipeline is Rails' original mechanism on how...

...practice we still need some form of minification etc. Don't spend more than 15 minutes looking at this approach as we're currently not using it. You should mainly...

Exercise 1: Maps In MovieDB, add a new field “Principal filming location”. In a movie’s show view, geocode that location and show a Google map centered around it

Exercise 1: XML On the start page of your Movie DB, show the title of a random movie that is coming soon to theaters. There's an XML feed for...

...the following two video summaries of David Allen's book Getting Things Done: Selbstorganisation 1: Schaffe ein System als Grundlage 🇩🇪 Selbstorganisation 2: Perfekt organisiert mit der GTD Methode 🇩🇪

makandra Curriculum

...sidebar with navigation links, a big content area and a footer: +------------------------------------------------------+ | | | BIG LOGO | | | +------------+-----------------------------------------+ | | | | Link 1 | HEADLINE | | | | | Link 2 | Lorem ipsum dolor amit. | | | At vero eos et accusam et justo. |

...the screen. The player starts with a score of 0. The arena randomly shows 1 out of 6 total moles. The aim of the game is to click on the...

...randomly hidden or shown. When the user clicks on a visible mole, she gets 10 points added to her score. When the user clicks on a hidden mole, she gets...

...that has two areas with a distinct look and feel. For instance there is (1) a visually ambitious frontend for consumers and (2) an admin area that has tightly packed...

makandra Curriculum

...commit messages, they are only kept short here to fit inside the visualization. Exercise 1: Split up the most recent commit Head over to https://code.makandra.de/makandra/advanced-git-example-project and fork the...

Easiest Way to Pick UI Colors 7 Rules for Creating Gorgeous UI (Part 1) 7 Rules for Creating Gorgeous UI (Part 2) Visual design rules you can safely follow...