Our Blog

Ongoing observations by End Point people

Job opening: Ruby on Rails & Vue.js developer

Jon jensen

By Jon Jensen
February 24, 2021

Two software developers at their computers Photo by WOCinTech Chat, CC BY 2.0, cropped

We are seeking a full-time software engineer specializing in Ruby on Rails and Vue.js to work with us on our clients’ applications.

End Point is an Internet technology consulting company based in New York City, founded 25 years ago! We have over 50 employees serving many clients ranging from small family businesses to large corporations.

Even before the pandemic most of us worked remotely from home offices. We collaborate using SSH, Git, project tracking tools, Zulip chat, video conferencing, and of course email and phones.

What you will be doing:

  • Develop new web applications and support existing ones for our clients
  • Consult with clients on software features and plans
  • Work together with End Point co-workers and our clients’ in-house staff
  • Use open source tools and contribute back as opportunity arises

What you bring:

Professional experience developing and supporting web applications in these technical areas:

  • 3+ years of development with Ruby on Rails and front-end JavaScript
  • Frameworks and libraries such as Vue.js, React, Angular
  • Databases such as PostgreSQL, MySQL, Redis, Solr, Elasticsearch, etc.
  • Security consciousness
  • Git version control
  • Automated testing
  • HTTP, REST APIs

These work traits are just as important:

  • Strong verbal and written communication skills
  • An eye for detail
  • Tenacity in solving problems and focusing on customer needs
  • A feeling of ownership of your projects
  • Work both independently and as part of a team
  • Ability to pass a criminal background check when clients require
  • A good remote work environment and self-discipline

What work here offers:

  • Collaborate with knowledgeable, friendly, helpful, and diligent co-workers around the world
  • Flexible, sane work hours
  • Paid holidays and vacation
  • Annual bonus opportunity
  • Freedom from being tied to an office location
  • Use your desktop OS of choice: Linux, macOS, Windows
  • For U.S. employees: health insurance subsidy and 401(k) retirement savings plan

company jobs ruby rails javascript remote-work

An Introduction to TypeScript

Jeff laughlin

By Jeff Laughlin
February 9, 2021

TypeScript logo

TypeScript is a programming language defined as a superset of JavaScript. It adds static type information to JavaScript code using type annotations. These annotations permit strong type-checking at compile-time, kind of like a very strict linter. They are only used for static analysis. TypeScript is transpiled to JavaScript for execution in the browser or Node.js and the type annotations are stripped out. It is still possible to use standard JavaScript type information at run-time, such as that obtained using the typeof and instanceof operators.

Adding type annotations brings many benefits. Most importantly, TypeScript can tell us when we’re doing something dumb that’s likely to cause a type-related bug. But more than that, it powers editors’/​IDEs’ context sensitive tool tips so when you hover or start typing the editor can supply helpful information so you can get your job done quicker. This is particularly useful to new developers as it saves them the trouble of reading all the sources to figure out the variable types from context, especially when debugging.

JavaScript is a fairly dynamic language but types still exist in JavaScript, whether we like it or not. Because it’s so dynamic it assumes that you the programmer know the type of every object you are using on every line of code and will do nothing to help you get it right. The type is specified by the context. The trouble is that in any non-trivial codebase it becomes impossible to be absolutely 100% certain about the type of some particular object that’s being passed around without reading the context, which is often a ton of code.

By eagerly annotating our JavaScript code with types we can eliminate entire classes of bugs from our codebase. TypeScript will never let you play loosey-goosey with integers and strings, for example. If you want a variable to be able to hold an int or a string you must explicitly declare it as type “integer” or “string”.

TypeScript lowers the total cost of ownership of a...


typescript javascript nodejs

Monads: Another tool from the functional programming toolbox

Kevin campusano

By Kevin Campusano
January 27, 2021

banner

I was first exposed to the world of functional programming back in 2007 with the release of .NET Framework 3.5 and the introduction of LINQ into the C# language. At the time, I was just beginning to learn how to code and LINQ seemed to be little more than an extension of the C# language that allowed programmers to use SQL-like syntax to interact with collections of data. This was mostly useful for interacting with databases, via LINQ to SQL. The concept of “functional programming” never even crossed my mind back then.

Once you had created a LINQ to SQL Object Model using the tools provided in Visual Studio, you could write code like this directly in C#:

var customersWithRecentExpensiveOrders =
  // Think of db.Orders as your hypothetical "orders" table.
  from o in db.Orders
  where o.Total >= 100.00 && o.Date == DateTime.Now
  // All orders have a customer
  select o.Customer;

Alternatively, you could also use the so-called method syntax:

var customersWithRecentExpensiveOrders =
  db.Orders
    .Where(o => o.Total >= 100.00 && o.Date == DateTime.Now)
    .Select(o => o.Customer);

LINQ would take that and turn it into native SQL that got executed against your database. Pretty neat.

So I ran with it and little by little I discovered that the set of tools provided by LINQ offered much more than syntactic sugar over database interactions. I discovered the power of LINQ when it came to interacting with lists of objects, database or no. That’s when the breakthrough came. LINQ was indeed a set of tools for working with collections, but more profound than that, it proposed a paradigm shift when it came to reasoning about problems whose solutions involved any sort of iterative logic.

It was weird to write and think about at first, but eventually, I adopted a programming style where I seldom wanted to write “vanilla” foreach loops. Looping manually using accumulators, iterators, and other types of temporary values began to feel clunky, inefficient, and verbose....


functional-programming javascript

Endless OS: A Linux Distro for Kids

Mom & daughter working at a computer Photo by August de Richelieu

In 2020 some of us had to work from home while taking care of the kids ourselves, as most childcare services are temporarily closed due to the COVID-19 pandemic. In this post I won’t complain about the pandemic, but rather share my experience.

I have installed several different Linux distributions for my kids’ desktop computer in the past, but have found it quite difficult to find a balance between strict parental controls and no parental controls at all. Then I came across Endless OS, a Linux distro based on Debian, but with heavy customizations to focus on school from home.

Installation

The installation process was smooth and easy. The install image I chose was quite huge though, at around 16GB. But given we can just use a USB drive as the installation medium nowadays this should not be a big issue. The installer does not seem to give an option to encrypt my hard disk with LUKS during the installation phase.

Endless OS is powered by OSTree (which is defined as “a system for versioning updates of Linux-based operating systems”) and Flatpak. According to the website, “Endless OS uses OSTree, a non-destructive and atomic technique to deploy operating system updates. That means updates can be installed without affecting the running state of the system, making the process safe and robust from environmental factors such as a sudden power loss.”

The default window manager is a customized Gnome.

According to its website, the operating system is free for individuals and non-commercial use up to 500 computers.

Desktop

Package installation and package updates

We can choose from a couple of ways to install new packages (or update them). You can either use the Control Centre, or (if you want to install remotely) the command line. Although Endless OS is based on Debian, the apt command does not work here. Instead you can use Flatpak, with commands like flatpak install <package name>. Flatpak assists the user when installing a new package. For...


linux kids

Creating a Messaging App Using Spring for Apache Kafka, Part 4

Kursat aydemir

By KĂĽrĹźat Kutlu Aydemir
January 14, 2021

Spring-Kafka Photo by Daniel Tran on Unsplash

This article is part of a series. The GitHub repository with code examples can be found here.

After a long break from this series let’s keep moving further.

Let’s configure and prepare the WebSocket session pool. As we go through some custom operations like authentication and storing messages on the time of socket messages and sessions received, we need to create a WebSocketHandler for WebSocket configuration. When a WebSocket session message is received we’re going to send the message to a Kafka topic. In order to achieve this we need to define our WebSocket message handler MessageHandler and Kafka message producer MessageSender. We also need a session pool WebSocketPool so we can manage the client sessions.

WebSocketPool

package com.endpoint.SpringKafkaMessaging.websocket;

import org.springframework.web.socket.WebSocketSession;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class WebSocketPool {
  public static Map<Long, Set<WebSocketSession>> websockets = new HashMap<>();
}

WebSocketPool holds client sessions in a map of <user_id, <set of WebSocketSession>>. This map allows multiple sessions for one user, ensuring it will work from multiple client applications.

MessageHandler

package com.endpoint.SpringKafkaMessaging.websocket;

import org.springframework.web.socket.WebSocketSession;

import java.io.IOException;

public interface MessageHandler {
  public void addSessionToPool(Long userId, WebSocketSession session);
  public void sendMessageToUser(Long userId, String message) throws IOException;
  void removeFromSessionToPool(Long userId, WebSocketSession session);
}

MessageHandlerImpl

package com.endpoint.SpringKafkaMessaging.websocket;

import org.springframework.stereotype.Service;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;

import java.io.IOException;
import java.util.HashSet;
import java.util.Set;

@Service
public...

java spring kafka spring-kafka-series

Cesium KML-CZML Editor

Dmitry kiselev

By Dmitry Kiselev
December 21, 2020

Image 00

End Point’s immersive technology team is happy to present a great new tool for the rapidly growing Cesium community: Cesium KML-CZML Editor. The editor gives users the ability to visually and dynamically edit KML and CZML in its Cesium browser window. Updates made with it can be exported at any time to CZML, the native markup language for Cesium.

The Cesium KML-CZML Editor addresses an important but hitherto unaddressed need of the Cesium community: It provides an intuitive interface for making adjustments to fix the many inconsistencies with how KML created for (and often by) Google Earth appears on 3D maps rendered with Cesium. It is a powerful tool for converting and adapting KML for Google Earth into CZML that displays nicely in Cesium. The editor also works as a visual editor for creating and editing CZML, regardless of whether you’re converting from KML.

The inconsistencies with how Cesium displays KML created for Google Earth are due to occasional differences between how Cesium and Google Earth render KML when various attributes aren’t specifically set within a given instance of code. The situation is similar to how web browsers sometimes interpret given instances of HTML differently. Just as with HTML, KML doesn’t require every attribute to be defined in a given instance of markup code.

Image 01

On the left side we have the editor toolbar, and on the right side the Cesium globe showing loaded or created entities the way they would appear in Cesium.

The Editor Toolbar consist of the following areas:

  • File Import: you can load KML, KMZ, CZML and GeoJSON formatted data, and you can load multiple files to combine them into one CZML document.
  • Creation tools.
  • A list of uploaded or created entities (will appear after upload or creation of a new entity).
  • The actual editor for entity properties (will appear after entity selection).

Let’s start with a very basic example of highlighting a building by marking it with a pin in Google Earth:

Image 02

Now let’s move the camera...


cesium google-earth gis open-source

Media erasure in the time of SSD

Ardyn majere

By Ardyn Majere
December 10, 2020

Garbage Photo by Alex Fu from Pexels

How valuable is your data? Losing it to a third party is usually a business’s worst nightmare—​and can cause legal or even criminal repercussions, depending on the drive’s contents and the business’s jurisdiction.

Every system adminstrator worth their salt knows that running “rm” (or equivalent delete operations) doesn’t actually remove data, it simply removes the file name from the filesystem and leaves the data in place on the disk.

When dealing with traditional storage, destroying (intentionally or otherwise) your data used to be relatively easy. A wise system admin could simply run:

shred /dev/sda

And be fairly certain of the result. A cautious one might run a demagnetizing wand over the drive. Only the most paranoid might destroy it physically.

The Age of SSDs

Nowadays, most servers have switched away from storing data on rotating metal or glass platters. Solid state drives, or SSDs, are faster, less prone to errors from physical impact, and generally more sought after.

SSDs have issues with speed if the drives are too full, and have a limited lifespan—​only a certain number of write operations can be achieved. This is less of an issue with modern drives thanks to wear leveling built into the firmware of the drives. However, this leads to some issues as well.

Complicated systems introduce issues

Because SSDs manage which blocks of storage they write to, a simple shred won’t do. There could be hundreds of bytes, or even kilobytes or megabytes, of data that the shred doesn’t reach.

Even some “traditional” storage can run into such issues these days. Hybrid drives offer some speed advantages: By leveraging a small amount of SSD storage, these drives save data to SSD first, then write it at slower speeds to the actual magnetic platters. The same issues with SSD storage can affect this cache of data.

So how to be sure?

Ideally, I would recommend using a combination of methods for security. Here are the main methods that...


security storage

Vue 3 is out with exciting new features

Bimal gharti magar

By Bimal Gharti Magar
December 8, 2020

Space Shuttle launch Photo courtesy of NASA

Vue 3 was officially released on September 18, 2020 with improved performance and some exciting new features.

Composition API

The Composition API is one of the most significant changes. It helps with logically grouping related fragments of components. In Vue 2, we used the Options API to pass various options during component configuration:

// src/components/ProductList.vue
<template>
  <div class="child">
    <h3>Vue2</h3>
    <div>
      <div class="add-product">
        <h2>Add Product</h2>
        <div>Name: <input name="name" v-model="newProduct.name" /></div>
        <div>Price: <input name="name" v-model="newProduct.price" /></div>
        <button @click="addProduct">Add</button>
      </div>
      <div class="search-product">
        <h2>Search Product</h2>
        <input name="name" v-model="filterText" placeholder="Start typing to search" />
      </div>
    </div>
    <div class="list-product">
    <h1>Product List</h1>
    <ul>
      <li v-for="product in filteredProducts" :key="product">{{product.name}}:{{product.price}}</li>
    </ul>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      newProduct: {name: '', price: 0.00},
      productList: [
        {name: 'Milk', price: 2},
        {name: 'Carrot', price: 12},
        {name: 'Sugar', price: 8},
        {name: 'Cheese', price: 20}
        ],
      filterText: ''
    }
  },
  methods: {
    addProduct: function(){
      this.productList.push({...this.newProduct})
    }
  },
  computed: {
    filteredProducts: function () {
      if(this.filterText.trim().length > 0){
        return this.productList.filter(p => p.name.toLowerCase().indexOf(this.filterText.toLowerCase())>-1)
      }
      return this.productList;
    }
  }
}
</script>

This component’s functions have several responsibilities, and as the code grows more functions with different responsibilities will be needed, making it more difficult to understand and implement new changes...


vue frameworks javascript
Page 1 of 193 • Next page

Popular Tags


Archive


Search our blog