Welcome to curated list of handpicked free online resources related to IT, cloud, Big Data, programming languages, Devops. Fresh news and community maintained list of links updated daily. Like what you see? [ Join our newsletter ]

Introduction to Object-Oriented Programming in JavaScript

Categories

Tags frontend-and-mobile software-engineering backend-development

Rainer Hahnekamp wrote this blog post about object-oriented programming (OOP) in JavaScript. It is aimed at students with no prior knowledge in OOP.

The author briefly explains programming paradigms. He also notes that OOP is based on real-world objects lets anyone read your code and understand what’s going on.

The article contains information on:

  • The Object-Oriented paradigm
  • Object as centerpiece
  • Class as template
  • What is encapsulation
  • What is inheritance

You will find three different programming paradigms used to create JavaScript applications. They are Prototype-Based Programming, Object-Oriented Programming and Functional-Oriented Programming.

There are many links to further resources in the article. Example code for ES6 is also provided which will help you to get better understanding of OOP paradimg. Cool!

[Read More]

How to use SSL/TLS with Node.js

Categories

Tags security-and-privacy backend-development frontend-and-mobile software-engineering

Detailed article by Almir Bijedic and Florian Rappl about setting up Node.js with SSL/TLS. Let’s Encrypt works beautifully, and having an SSL-secured site is easier than ever.

In the article, they work through a practical example of how to add a Let’s Encrypt-generated certificate to Express.js server.

But protecting our sites and apps with HTTPS isn’t enough. We should also demand encrypted connections from the servers we’re talking to. You will see that possibilities exist to activate the SSL/TLS layer even if it wouldn’t be enabled by default.

They explain how typical layers stack from website running in the browser perspective looks, talk about resources and performance of the web server with enables HTTP/2.

The article touches these topics:

  • Basic HTTPS communication
  • HTTPS in Node.js
  • How to generate certificates
  • HSTS web security policy mechanism
  • HSTS is a web security policy mechanism

… and more. In 2018 and beyond, there’s no excuse to dismiss HTTPS. Well written!

[Read More]

Parsing logs 230x faster with Rust

Categories

Tags backend-development software-engineering architecture-and-apis data-and-analytics

Andre Arko blog post about dealing with logs for very busy web application behind RubyGems.org. A single day of request logs was usually around 500 gigabytes on disk. They tried few hosted logging products, but at their volume they can typically only offer a retention measured in hours. The only thing they could think of to do with the full log firehose was to run it through gzip -9 and then drop it in AWS S3.

Every day, they generated about 500 files that are 85MB on disk (compressed), and contain about a million streaming JSON objects that take up 1GB when uncompressed.

They tried to retrieve advanced statistics using AWS Glue, Python for Spark, running directly against the S3 bucket of logs. This proved to be expensive solution. At about $1,000 a month.

Then they tried Rust. It turns out serde, the Rust JSON library, is super fast. It tries very hard to not allocate, and it can deserialize the (uncompressed) 1GB of JSON into Rust structs in 2 seconds flat. And finally they stumbled upon Rust parallel iteration library, Rayon.

rust-aws-lambda, is a crate that lets your Rust program run on AWS Lambda by pretending to be a Go binary

Read, how they come up with inventive solution and used rust-aws-lambda, a crate that lets your Rust program run on AWS Lambda by pretending to be a Go binary. As a nice bonus for their use case, it’s only a few clicks to have AWS run a Lambda as a callback every time a new file is added to an S3 bucket.

And the cost? 500 log files, parsing 500GB of logs per day using AWS free tier! The code repository is aslo included in the article. Perfect!

[Read More]

Apple CoreML: Introduction to machine learning in mobile app development

Categories

Tags frontend-and-mobile ai-and-machine-learning product-and-design

Post by JetRuby Agency about enhancing your mobile app with machine learning. You will find out what machine learning is and understand the way it changed our life. CoreML is a framework that was presented by Apple in 2017.

CoreML allows simplifying the integration of machine learning models in applications ecosystem.

Based on CoreML were implemented various products of the company including Siri, QuickType, Camera and so on. CoreML contributed to developing “clever” features.

This framework is based on the native technologies, such as Accelerate and Metal. Since it allows giving full play to the hardware of a device, performance becomes better and battery’s life longer.

This technology allows iOS 11 apps to run machine learning models locally on your device. Basically, this allows using such features as images recognition, analysis of the text/sounds without using any Internet connection.

Learn more in this introduction into machine learning with CoreML. Example code and screen grabs of developed mobile app could be also found in the article!

[Read More]

NGINX Unit supports TLS and JavaScript apps with Node.js

Categories

Tags devops-and-ci-cd software-engineering business-and-emerging-tech miscellaneous backend-development frontend-and-mobile security-and-privacy

Nick Shadrin of NGINX, Inc. wrote this article about TLS and Nodejs apps support in NGINX Unit. NGINX Unit is a dynamic web and application server, designed to run applications in multiple languages. Unit is lightweight, polyglot, and dynamically configured via API.

Application connectivity today requires proper and rapid configuration and reconfiguration.

In this post author covers the configuration of TLS certificates and Node.js applications in detail. Security and encryption is a must for every production application.

NGINX Unit is configured on the fly, without relying on static configuration files and requiring process reloads. Now all apps, including Go and Node.js, can be deployed into a larger production environment faster, more safely, and with no downtime.

With NGINX Unit, you can add, change, and remove certificates without reloading application processes. Detailed configuration is included. Read more, to learn about this lightweight application server from NGINX.

[Read More]

Microservices for Java developers: Implementing microservices (synchronous, asynchronous, reactive, non-blocking)

Categories

Tags backend-development architecture-and-apis software-engineering

Andrey Redko published this guide how to implement microservices for Java developers. There is a variety of paradigms you may encounter while implementing the internals of your microservices.

The pace of innovation in Java has increased dramatically over the last couple of years. With the fresh release cadence, the new features become available to the Java developers every 6 months.

In the guide you will find code example and implementation of microservices using:

  • Synchronous programming paradigm
  • Asynchronous programming paradigm
  • What blocking means in context of I/O
  • Non-blocking in JVM ecosystem
  • Reactive programming (programming with asynchronous data streams)

Short, but very informational post for seasoned developers wanting to learn more about microservices pattern implementations in Java world. Good work!

[Read More]

Create an Alexa skill with serverless and a conversation

Categories

Tags frontend-and-mobile architecture-and-apis cloud-and-infrastructure ai-and-machine-learning miscellaneous data-and-analytics

An article by Niklas Heidloff and Mark Sturdevant on hot Alexa skills topic. In it you will find how to create an Alexa skill with serverless and a conversation. Apart from Alexa you will also use Watson to discuss the weather, build a conversation, or choose one from a library.

Watson is a question-answering computer system capable of answering questions posed in natural language, developed in IBM’s DeepQA project.

In the article you will create an Alexa skill using Watson™ Assistant via the Apache OpenWhisk serverless framework. An example conversation is included to demonstrate how to pass context between different intents, resulting in a weather lookup.

To remember the conversation state and be able to request external actions, authors chose Redis to save the state across invocations of serverless functions, and they built an external action that retrieves the weather forecast.

When you complete this pattern, you will understand how to:

  • Create an OpenWhisk action in the IBM Cloud Functions serverless platform
  • Use Redis to store a session’s conversation context across events
  • Import a conversation from the BAE or a JSON file
  • Invoke a conversation with Watson using Node.js
  • Use The Weather Channel data service to look up locations and forecasts
  • Create an Alexa skill to reach tens of millions of customers

Flow chart, video demonstration and open source code in GitHub repository for all systems included. Amazing!

[Read More]

The three types of performance testing

Categories

Tags testing-and-quality software-engineering devops-and-ci-cd frontend-and-mobile

Harry from csswizardy.com shared this post about performance testing and where it sits within software development life cycle. Often performance testing ownership is not clear and this is a common reason why performance gets overlooked.

Author tries to distill the types of testing that we do into three distinct categories: Proactive, Reactive, and Passive. Each have their own time, place, purpose, focus, and audience.

The first kind of testing a team should carry out is Proactive testing: this is very intentional and deliberate, and is an active attempt to identify performance issues. This takes the form of developers assessing the performance impact of every piece of work they do as they’re doing it.

Reactive testing should be reasonably automated, and should be carried out in as live-like an environment as possible.

Reactive testing is usually done in response to an event in the development life cycle, such as a build or a release. You could use Gulp tasks that run Lighthouse against your staging environment, automated WebPageTests that run at every deployment, performance budgets that run on every build, and so on.

Passive tests to gather data over time and asses the situation: can we spot patterns? Do certain browsers or geographic locales suffer more than others? Do changes in performance correlate to changes in business metrics?

More information on tooling and charts accompanying explanations also in the article. Good read!

[Read More]

Automate build, test and deploy of a static Jekyll site

Categories

Tags devops-and-ci-cd software-engineering frontend-and-mobile

Blog post by German engineer Lars Lühr in which he focuses on CICD for Jekyll. Jekyll is a static web site generator written in Ruby. In this post he wants to provide a complete tutorial on how to automatically build, test, integrate and deploy a Jekyll site to a FTP server.

His setup evolves around:

  • Git as preferred code version tooling
  • Gitlab Git repository as central repository
  • Gitlab CI Pipelines for build, test and deploy
  • Web and FTP servers

For the deploy-to-FTP-part we will use GitLabs secret variables.

He then explains how to use rakefile (rake and bundle) is code written in Ruby. He defines the tasks which can be called. Also touches on GitLab CI Security preparations.

Complete configuration together with example code is available, also explanation how pipeline works, staging strategy and more. Nice one!

[Read More]

How to mock ES6 class

Categories

Tags frontend-and-mobile testing-and-quality backend-development software-engineering

Madhan Ganesh post about mocking a class in JavaScript for the purpose of unit testing. The post targets developers who are coming to ES6 from environments that has features like dependency injection and interfaces.

Object is a first citizen in JavaScript land. The stunningly easy way to create an object makes this language simple to start. To create an object you start with object (and not class).

var person = {
  name: 'Velu'
};

Author then explains how to use:

  • Constructor function
  • Prototype as a mechanism to share a code
  • ES6 class
  • Mocking ES6 class

Basically to mock a method on ES6 class just get the reference of the function through class prototype and stub the same. Everything is well explained via code examples and link to the GitHub repository provided. Really useful for anybody new into ES6 JavaScript.

[Read More]