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 ]

Express.js and AWS Lambda serverless love story

Categories

Tags javascript nodejs app-development

Slobodan Stojanović article about creating serverless applications in Express.js. Express apps are easy to build, it is de facto the most popular Node.js framework.

For a simple app, you just need to add a few routes and route handlers. That’s it.

Article then describes how to create serverless API. This API consists of an API Gateway and AWS Lambda functions. Deployment is to AWS Lambda is done via Claudia.

Article also points out on some limitations – e.g. AWS Lambda will auto scale up to 1000 concurrent executions by default. Some other limitations:

  • Websockets don’t work with AWS Lambda
  • Upload to the file system will not work eithe
  • Execution limits
  • API Gateway has a timeout of 30 seconds
  • AWS Lambda’s maximum execution time is 5 minutes

Plenty of code examples and charts to help you understand new concepts with serverless. Nice intro into AWS Lambda and Express.js.

[Read More]

Web scraping with Golang

Categories

Tags programming golang web-development

Nano Dano wrote this lengthy article about web scraping with golang. It can be useful in a variety of situations, like when a website does not provide an API, or you need to parse and extract web content programmatically. Tutorial walks through using the standard library to perform a variety of tasks like making requests, changing headers, setting cookies, using regular expressions, and parsing URLs.

Before doing any web scraping, it is important to understand what you are doing technically.

You will learn how to use:

  • Go – the Go programming language (tested with 1.6)
  • goquery (for some examples) – Go version of jQuery for DOM parsing

Then author goes over (in great detail with code examples) all topics needed for successful scrapping:

  • How to make an HTTP GET request
  • Make an HTTP GET request with timeout
  • Set HTTP headers (Change user agent)
  • Download a URL
  • Use substring matching to find page title …

And much more. Article also contains useful links to help you with Go installation etc. Excellent!

[Read More]

The 4 Inflection Points of Company Culture

Categories

Tags agile teams career

Brian Halligan, CEO of HubSpot, wrote this interesting article about lessons from HubSpot’s journey from startup to scaleup. HubSpot is inbound marketing and sales software that helps companies attract visitors, convert leads, and close customers.

The first rule about culture is that you don’t talk about culture.

The kind of culture he wanted for HubSpot in their early days was one where we didn’t have to think about it. Author subscribed to the Fight Club credo: the first rule about culture is that you don’t talk about culture.

Then they broke that rule. And he describes how they’ve been:

  • Discovering culture
  • Documenting culture
  • Operationalizing culture
  • Measuring Culture

And it was a bumpy road. But, they made sure to communicate specifically to “mid-life” employees about existing opportunities for development, and also came up with some new policies to create opportunities.

You can read more in this excellent article.

[Read More]

HTTP heuristic caching (missing cache-control and expires headers) explained

Categories

Tags programming web-development

Paul Calvano explains why WebPageTest can sometimes show that a repeat view loaded with less bytes downloaded, while also triggering warnings related to browser caching. It can seem like the test is reporting an issue that does not exist, but in fact it’s often a sign of a more serious issue that should be investigated.

Article touches on the fundamentals of HTTP caching. HTTP client to cache a resource it needs to understand:

  • RFC 7234 specifically section 4.2 (Freshness) and 4.3 (Validation), e.g.:
  • How long am I allowed to cache this for?
  • How do I validate that the content is still fresh?

The HTTP Response headers typically used for conveying freshness lifetime:

  • Cache-Control (max-age provides a cache lifetime duration)
  • Expires (provides an expiration date, Cache-Control max-age takes priority if both are present)

The HTTP response headers for validating the responses stored within the cache:

  • Last-Modified (contains the date-time since the object was last modified)
  • Etag (provides a unique identifier for the content)

When both are present in a response, the browser will prioritize the Cache-Control over the Expires header. And much more detailed information in the article. Well worth your time!

[Read More]

Golang testing at Stream

Categories

Tags programming golang tdd

Federico Ruggi deep dive into testing of golang apps at Stream. Stream’s API is used in production by more than 500 companies and 200 million end users. While they like to move fast, they definitely don’t like to break things. Stream is an API for building activity feeds that enables your development team to build personalized activity feeds this week.

Testing is a core part of their development process. Not a single line of code is deployed to a live system before it’s properly tested and peer reviewed. Their workflow looks like this:

  • Implement the new feature with TDD using Golang testing package, alongside some goodies from stretchr/testify
  • Write integration tests and acceptance tests with onsi/ginkgo and our own soon-to-be-released bdd library
  • Wait for the green light from Travis CI
  • Check test coverage on Codecov
  • Ship the new feature to staging

Article then explain each bit of their workflow with code examples and any decision reasoning.

Writing tests with Go is generally a fun experience, thanks to the simplicity of the language: the standard library offers a streamlined testing environment, and the vibrant Gophers community came up with nice tools built on top of it. Good read!

[Read More]

JavaScript iteration protocols (Iterable and Iterator) and Generators

Categories

Tags programming javascript

Anton Petrov interesting article about iteration protocols. Iterables and Iterators are not built-ins or syntactic sugar introduced by some recent ECMAScript standard, but protocols that were defined in the ECMAScript’s 6th edition.

Iterables and Iterators can be implemented by almost any object following some rules and conventions.

Generator, on the other hand, is a new built-in object, returned by a new kind of function: the generator function. This object conforms to both protocols.

So with ES2015+ we have the power to design a way for our objects to iterate through their values.

Do not reuse generators! Even if the for…of loop is terminated early, for example via the break keyword. Upon exiting a loop, the generator is closed and trying to iterate over it again does not yield any further results.

More in the article, which in detail describes:

  • The Iterable protocol
  • How to create your own Iterable
  • The Iterator protocol
  • How to create an Iterator
  • What are Generators

Good read!

[Read More]

Want to increase your worth as a developer? Learn to impact the business.

Categories

Tags programming devops

Brandon Gregory thoughts on how to increase your worths to the business. As developers, working toward better positions and better salary means increasing your worth to your employer. Getting better at the technologies you use is a given. How do we tangibly increase our value to the companies we work for?

We have to be able to talk to our business peers about lead generation, CRM, metrics, EBITDA, targeting, retargeting, revenue models, search engine marketing, direct response landing pages. Even more than that, we have to know when and where to put on business hats ourselves.

Businesses don’t just want good coders. They need good people who can code at the same time as understanding the real-life application of what they are doing. Business-savvy, young, bright developers are very valuable.

Some advice in the article to developers:

  • Speak the language
  • Combating the dreaded rush job
  • When expenditures are savings
  • Sell solutions, not technologies
  • The overly-technical oil change
  • Take a step back to spring three steps forward

Really good points in this article! Employees and managers are often praised and sometimes promoted when they bring ideas to the table to reduce the time and money we had to spend to get things done.

[Read More]

Why performance matters

Categories

Tags programming web-development javascript

Jeremy Wagner wrote this piece about a common problem: Performance. Sites and apps are richer in functionality than ever before. As a consequence, they’ve become more demanding of network and device resources. So much so, that we now struggle with achieving a high level of performance across a variety of network conditions and devices.

Performance is about retaining users. The BBC found they lost an additional 10% of users for every additional second their site took to load.

Topics explored in the article:

  • Performance is about improving conversions
  • Performance is about the user experience
  • Performance is about people
  • Mind what resources you send
  • Mind how you send resources
  • Mind how much data you send

Good points with further links and guides on improving performance. Good read!

[Read More]

17 JavaScript / Node.js performance coding tips to make applications faster

Categories

Tags programming javascript web-development

Paul Shan article about misconceptions, shallow knowledge, bad assumptions among the JavaScript community members. In this article author has come up with a list of tips, which can make your JavaScript application faster.

This article is about coding in JavaScript to make the performance better.

Some rules and tips form the article:

  • No global vars please
  • Only homogeneous Array
  • Put common codes in a function
  • Closure & timer – a deadly combo
  • Create class for similar kind of objects
  • forEach vs for()
  • Avoid for…in

And many more in the article. Increasing your server’s configuration, scaling it out, distributing the services are some of the very well known processes to make your application perform better.

But if your code is causing memory leaks or sequential processing; all those dev-ops steps will not able to save your server getting slowed down or even crashed. Good read even for seasoned programmer!

[Read More]

Productive with Docker in 20 minutes

Categories

Tags containers aws docker

George Fogle article about how to find a better, more productive development workflow with Docker. Docker and container-based development is really going to save you time in the future. As well as make working and debugging code a breeze.

A container is acting like an entirely separate computer, even though it’s on your computer. So using the name localhost inside of a container is not the same as using localhost in code that is running on your computer.

The article then explain how to use:

  • Docker
  • Docker Compose
  • Dockerfile
  • Image
  • Containers
  • Debugging effectively

When we’re creating an image, we first create a script file that will run some commands that Docker recognizes called a Dockerfile. The output of these commands create an image, that we’ll start container processes based off of.

Article also describe usage of environment variables with the environments keyword in docker-compose.yml.

Author also mentions how we can be more effective at debugging by using breakpoints that attach to the node process in our container. We an expose a port, where we can attach and set breakpoints from inside IDE. Interesting, give it a go!

[Read More]