Articles

Inversion of Code – HTTP Lambda functions

Normally when we create an HTTP REST endpoint, we add code to our server endpoint, and assume the client provides the arguments to our code. What if we could reverse this responsibility, such that the client provides the code the server executes?

Among other things, this implies we can have one endpoint doing "everything". We wouldn’t need to create dozens of endpoints to expose our API, and we could get away with creating a single endpoint, that clients invokes, regardless of what they want to do. If the client wants to create a record in our database, read records from our database, or count records in our database is irrelevant – He’d still use the same endpoint for all of these tasks. In addition, the client could become much more creative in regards to how he interacts with our API, and do things we couldn’t even imagine as we created our API. The latter of course sums up the problem, which is that clients could inject malicious code into our server.

Source de l’article sur DZONE

Should We Be Designing For Voice?

Voice is one aspect of technology that is getting bigger and bigger, and showing little sign of relenting. In fact, 2019 data revealed that 22% of UK households owned a voice-controlled digital home assistant device such as an Amazon Echo or Google home. This is double the figure recorded in 2017 and it is predicted that over the next five years nearly 50% of all homes will have one. Smart home adoption rates are increasing, and it shows how voice control is something we are all becoming more accustomed to.

With these high figures, does it follow that voice should be something web designers build into sites? Or is it merely a gimmick that will die out and render sites with hardware and complex design issues? You only have to look at the failed introduction of Google glass to see that certain technological advancements don’t always have the outcome that might be expected.

Multiple Voices

One of the first issues with voice is establishing whether you want sites to recognise everyone’s voices, or just those who have registered. If you’re using the site in a crowded room will it pick up on snippets of conversation from others and think these are instructions? Google Home has a feature whereby you have to register your voice with its app to use more personalised features such as the shopping list. Is this the sort of thing websites would need?

Accents

The implementation of voice is complex, not only does it need to understand certain languages (such as English), but all the accents and variations too. With 160 English dialects alone, that is a lot that the technology needs to understand – not including mispronunciations, slang, and colloquialisms. Also, if a site is used all over the world (which many are) how many languages will it need to know?

Privacy Issues

if there are clips of your voice out there on the web…it can easily be imitated

If a website involves a feature such as online shopping or other functions which require sensitive details to be input, this could put people off using voice. Users need to know where this saved data is being stored, how it will be used and if it is secure. In 2018, HMRC had signed up about 6.7 million people to its voice ID service and HSBC said over 10,000 were registering each week. This shows many trust the service, but experts say that if there are clips of your voice out there on the web (such as in a podcast) it can easily be imitated. Bringing with it security and privacy issues.

According to futurologist Dr Ian Pearson, who invented the text message back in 1991, it won’t be long until we can complete a financial transaction with just a few words and a gesture. This can be a time-saver for things such as online shopping, but we need to ensure there are the correct security steps in place.

Users Don’t Talk The Way They Type

When speaking we tend to use shortened and more colloquial language as opposed to when we type. The voice function on a website will need to be able to adapt for this. One example is if you are filling in a form or comment box by voice for a website, you will need to tell it what to punctuate, letting it know where to add a comma, exclamation mark etc.

Website Processes Need to be Simpler

With the web as we use it now, we often browse through pages, reading other snippets of information before clicking through to the page we want. With voice recognition it will cut out these middle steps. For example, if you are looking for a recipe of something specific, you will just say the command “Show me the … recipe” and it will take you straight there. This direct access to what we are looking for could lead to a simplification of websites.

Regular Updates

With websites as they are now, they need updates semi-regularly, depending on how they are built, how complex they are, and what features we have built into them. A voice-based site will need updating regularly, whether to add new words or processes or to keep up with the fast-adapting technology. It might end up being quite a complex process.

Mistrust

While there are more of us now than ever using voice control via tech such as Alexa, Google, and Siri, there is still a level of mistrust over it. It’s still not quite clear where data is being stored, if it is being stored, and how easy it could be to abuse.

Larger Storage and Bandwidth

If a site is built for voice, will it utilise a ready-built plugin or will it have its own software built by developers? Will this feature require a greater amount of storage and bandwidth to cope with it? These are further factors to consider when thinking of the future of implementing voice to websites.

We Still Don’t Know Where It Will Go

Voice technology while working in some respects, is still a bit of a grey area when it comes to future use. Will it be the next big thing as many have predicted, or will it simply die down?

Look at Google Glass – highlighted as the big new technology, they soon died down and were eventually discontinued. Smart watches were another thing. You can see their initial downfall by reading an article published in 2017 about smartwatches – how major smartwatch makers such as Apple and Samsung rushed into the market before the technology was ready and they subsequently failed. Motorola exited the smartwatch market, Pebble and Jawbone shut down and Fitbit sold 2.3 million fewer devices than in their previous quarter. It was perceived as being a fad. However, fast forward to 2020 and more people than ever are wearing and using smartwatches. The smartwatch market was valued at shipment volumes of 47.34 million in 2019 and is expected to reach 117.51 by 2025, reaching a growth of 15.4 over the next five years.

Will voice follow a similar trend?

No More Impulse Buying

People enjoy browsing websites and many businesses rely on user’s impulse buying and ask their websites to be designed to reflect this. With voice taking you directly to the page’s users want to find, will they bypass these potential selling traps and just buy what they want – rather than added extras? Will it end up being a negative for businesses and see users not as satisfied for the experience?

Voiceless Still Matters

You will also have to remember that not all devices might work with voice, or people might be browsing somewhere where voice cannot be used. This means in the design process it needs to work both for voice instruction and manual use. It needs to work just as well for both to ensure the customer journey isn’t affected.

There are many ways voice can affect how we design websites in the upcoming future. It’s important to take note of market trends and usage – seeing how people use voice and thinking of the customer journey. It’s vital we don’t forget the end goals of websites – whether it’s to inform or to sell, the implementation of voice needs to assist this process not make it harder.

 

Featured image via Unsplash.

Source


Source de l’article sur Webdesignerdepot

Eta-Expansion and Partially Applied Functions in Scala

This article is for Scala programmers who know at least these essential concepts: what a method is and how to define a function value (lambda). Here we’ll discuss the topic of eta-expansion and partially-applied functions, which are often loosely covered and piecemeal.

You can read this article over at the Rock the JVM blog in its original form or watch as video on YouTube or in the video below:

Source de l’article sur DZONE

Introduction to PDO Extension: How to Use PDO for Different Databases

In this article, we will talk about what a PDO is, why is it necessary, and how to work with it.
Let’s start with the fact that for a long time php-programmers have been discussing the fate of the native functions to work with the database: mysql_connect, mysql_query, and others. The fact is that in upcoming versions of PHP data will be erased, these functions will go "Obsolete". Thus PHP developers should force on other tools to work with the database.
Currently, there are two alternatives solutions; mysqli extension and expansion of PDO. In this article, we will discuss PDO.
PDO – PHP Data Objects – is a layer that offers a versatile way to work with multiple databases.
This layer has several advantages:
  • PDO allows you to work with different databases, such as: MYSQL, Oracle, PostgreSQL and many others.
  • PDO allows you to work with a prepared statement
Now let’s talk about all this in more detail.

Connecting to a Database Using PDO

Before you start working with PDO, you must make sure that you have the correct extension – php_pdo_mysql.dll. This can be verified through the function phpinfo(). If everything is okay, you are good to go.
First we need to connect to the database:
PHP

 

xxxxxxxxxx
1

15

 

1

/ / MuSQL

2


3

   $Database = new PDO ("mysql: host = $ host; dbname = $Databasename", $username, $password); 

4


5

/ / PostgreSQL

6


7

   $Database = new PDO ("pgsql: host = $ host; dbname = $Databasename", $username, $password);

8


9

/ / MS SQL

10


11

   $Database = new PDO ("mssql: host = $ host; dbname = $Databasename", $username, $password); 

12


13

/ / SQLite

14


15

   $Database = new PDO ("sqlite: my / database / path / database.db");

As you can see from the example, each database connection string is slightly different from each other
You should always use try/catch when you are trying to connect to the unit, so that on exception we do not disclosed any data to the user.
PHP

 

xxxxxxxxxx
1

 

1

try {

2

   $Database = new PDO ("mysql: host = $ host; dbname = $Databasename", $username, $password); 

3

} 

4

catch (PDOException $ e) { 

5

   echo "Unable to connect to database"; 

6

}

Source de l’article sur DZONE

Exciting New Tools for Designers, August 2020

The common theme in this month’s collection of new tools and resources is “things that help you show off your work.” Many of these tools are made to help you better web products or apps or showcase designs with others.

Here’s what new for designers this month.

Naturaltts

Naturaltts is an online text to speech converter, that allows you to download an mp3 recording. The tool has more than 60 voices to choose from in six languages. There’s a free plan for personal use (based on characters converted) and affordable paid plans for higher volumes and commercial users. One application of this tool is voiceover for videos or tutorials.

Handz

Handz is a library of hands with different gestures in three-dimensional shapes. The collection includes 12 gestures with nine skin colors, and three different sleeve types. Put all that together and you have 320 potential combinations that you can use for projects. The library is completely free and works in a variety of formats with different tools.

Isoflow

Isoflow allows you to create isometric diagrams for presentations and illustrations with ease. You can edit and then export diagrams for print or website use, thanks to vector rendering.

Device Shots

Device Shots is a small web app that helps you generate a high-resolution device mockup using a screenshot of your website or mobile application. It supports almost every device type you can think of and resizes for social media platforms.

Barchartrace

Barchartrace is a simple MIT open source bar chart generator. Use it to create some of the animated charts you see on social media. Just insert your information (upload via CSV file), choose animation settings, and go.

Zettlr Markdown Editor

Zettlr is a free and open source markdown editor for Mac OS. Zettlr supports simple notations, references, includes a dark mode, and tagging. It’s made for note takers who need a tool to amp up their projects, and is used primarily in higher education.

CSS Leaning Card Effect

The CSS Leaning Card Effect replicates the bookshelf feel you get when rectangles lean with a shadow against planes. Lynn Fisher does it in the pen with code that you can see and work on with your own images.

Lemon.io

Lemon.io is a tool that matches you with freelance developers to get projects moving more quickly. You are guaranteed a match in 24 hours and there is no risk if the match doesn’t work out. Just tell Lemon.io what you need and the algorithm will match you with a dev from the database. Prices for development through the platform start at $35 per hour.

Papercups

Papercups is a customer messaging tool that lets you chat in real-time. The customizable widget works with your favorite tools, such as Slack and Gmail, and is free to use. Chat apps are one of the most in-demand website features right now.

CSS Click to Animate Gif

Christian Heilmann has created a great guide/experiment in pure CSS that adds a play button on top of animated GIFs so that users can control the motion. He developed the concept because GIFs can get overwhelming and annoying. Learn how he did it and see it in action.

3D Book Image Generator

Here’s another little bit of CSS magic with a 3D Book Image Generator. Just input your image and set some specifications and get a 3D book cover image that you can use in projects. (There’s also an accompanying tutorial if you want to learn how to generate the CSS on your own.)

Luckysheet

Luckysheet is an online spreadsheet – it’s a lot like Microsoft Excel – with powerful data functions and tools. It’s user-friendly and open source. It even has quite a few built-in mathematical formulas and supports various table types.

RevKit

RevKit is a design system UI kit that works with Sketch, Figma, and Adobe XD. It includes plenty of organized components that you can pop right into designs to help get them started faster. It also includes a style guide, elements, and form controls. The download is free.

Card

Card allows you to store social media profiles, websites, and files in a customized profile. Share it in one click. Replace awkward contact exchange and multiple usernames with a simple QR code or link.

Scale Nucleus

Scale Nucleus helps visualize data, curate interesting slices within your dataset, review and manage annotations, and measure and debug model performance. This tool claims to be “the right way” to develop ML models.

Previewed

Previewed is a mockup generator to create beautiful promotional graphics for your app. Browse a variety of templates, pick one, customize, and download your design to show off.

NSFW Filter

NSFW Filter is a browser extension that blocks images that aren’t safe for work. The best part is that it runs locally in-browser and doesn’t access any of your data. Plus, it saves you from on-the-job embarrassment.

ColorFlick for Dribbble

ColorFlick for Dribbble is another browser extension that makes it easy to copy hex codes from the tool to your clipboard with ease. You can also create palettes you can share from your favorite shots using Coolors.

Tabler Icons

Tabler Icons is a collection of more than 550 SVG icons that you can customize. Change the color, size, or stroke width with on-screen controls and then click to copy the icons you want to use. It’s that simple!

Teenyicons

Teenyicons might be some of the cutest icons out there. This collection includes minimal 1px icons in outline or solid fills. And there are plenty of icons to choose from. Adjust the size and grab the ones that you need for projects.

Basicons

Basicons is a set of simple icons for product design and development. Plus, they are updated weekly.

Chozy Mermaid

Chozy Mermaid is a super funky novelty typeface to close out summer. The characters feature beach themes within slab characters. It might be hard to find an application for this one, but it is too fun not to share.

Dotuku

Dotuku is a dingbats font with a back to school theme. The limited character set features filled and outline styles that are perfect for classrooms.

Margin

Margin is a fun retro style typeface with a 1970s vibe. It’s a “chubby serif” with 60 characters and 58 glyphs.

Rollanda

Rollanda is a signature-style script with a thicker weight and rough stroke. The character set is pretty robust.

Source


Source de l’article sur Webdesignerdepot

Cutting Step-Functions Costs on Enterprise-Scale Workflows

AWS Step Functions is a great service for orchestrating multi-step workflows with complex logic. It’s fast to implement, relatively easy to use and just works. The problem is its price.

For relatively low-scale projects, it’s a feasible solution. But for large-scale, enterprise-grade orchestration with hundreds of millions of processes, each with dozens of steps, it can be cost-prohibitive.

Source de l’article sur DZONE

Reactive Frameworks:  »Robbing Peter to Pay Paul » and Dependency Contexts

This post is the continuation of a previous blog on functional programming and implementing safety restrictions on object orientation to focus on the resulting functional frameworks. So, just to recap, here are some important functional programming concepts. Functional programming:

Clean Code – Robert C. Martin’s Way

Writing good code in accordance with all the best practices is often overrated. But is it really? Writing good and clean code is just like good habits which will come with time and practice.
We always give excuses to continue with our patent non-efficient bad code, reasons like no time for best practices, meeting the deadlines, angry boss, tired of the project, etc. Most of the time we try to procrastinate by saying will make it efficient and clean later but that time never comes.
Bad code is not problematic for us to understand but for the other developers who will handle that after us.

So, let me get you to the points by Robert C. Martin in his captivating book Clean Code.

Source de l’article sur DZone