cloud, webdev

Code Reviews Will Improve You

Fog on mountains

There are many options to improve your software quality. One of the most effective methods is to do code reviews with other developers.
Code reviews are as much a social interaction as a technical best practice. In a healthy engineering culture (egoless), team members engage their peers to improve the quality of their code and increase their productivity. Developers understand that the time they spend looking at a colleague’s code is repaid when other team members examine their own deliverables. These days, most of the companies (e.g. Facebook, Netflix, Google, Amazon, Uber) are embracing it, so it’s another sign that something is working well here.

Why Ask For A Peer Review?

  1. The most basic reason is to find bugs.
    If you won’t ask for it, you will miss bugs in your code:
    a. Accidental errors – typos or mixing variables.
    b. Structural errors – dead code, logic or algorithm bugs, performance or architecture concerns. These are often much easier to spot for an external reviewers the see your work from their perspective.
  2. You preventing from yourself a great way to learn and get better – Committers are motivated by the notion of a viewer who will look over the change request: the committer tends to clean up loose ends, consolidate TODOs, and generally improve the commit.
  3. Your code is not as clear as you think it is nor its testability and readability.

Code reviews are very important not only for developers but also to product managers, test engineers, designers and others. In many cases, developers will be the first ones to see the benefits. It will allow them to move faster and with higher quality. Continue reading

Advertisements
Standard
JavaScript, life

The Monty Hall Problem

The Monty Hall problem is a brain teaser loosely based on the American television game show “Let’s Make a Deal” and named after its original host, Monty Hall.

I wrote a little web app that show you what is the right choice with a simulator. It’s a bit hard to explain the correct solution as it’s going against ‘common’ sense. Continue reading

Standard
webdev

Useful Google Sheets Functions

water falls

From time to time you want to get more from your data in Google Sheet. It might be some information you collected from a form or any other spreadsheet with data you wish to work on. Here are some useful functions for common tasks.

1. Return the last row

There is no specific function to return the “last row” – but this hack is working perfectly.

=INDEX(A:A,COUNTA(A:A),1)

2. Joining text

Useful for all the cases where you have first name and last name in 2 columns and you wish to join them.

="this name " & A1 & “ plus this extra name ” & B1

or if you have cells you wish to merge into one with a certain delimiter:
=join(“;”,A1:A5)

3. Import any RSS, HTML or CSV data Continue reading

Standard
Chrome, HTML5, webdev

Share Location On The Web With Waze

If you have a website that contain ‘just’ your (business) address you can do better.

How?

You can use the links below to help your users navigate to you with one click.

This will save them the trouble to ‘select’, ‘copy’ and open their map app in order to get to you. Waze supports an API which enables developers to open the Waze client application through an external URL. The URL can be accessed from within your mobile web page or web app.

waze-logo

The following are the available parameters you can insert to your ‘a href’ tag: Continue reading

Standard
bots, JavaScript

Build Your First Smart Bot For Google Home

In the past few months, I heard someone smart saying that “the future is artificial intelligence first”.

Artificial intelligence, is making computers “smart” so they can think on their own and be even more helpful for us. It’s clear that Google, has been investing heavily in the areas of:

  • Machine learning – Teaching computers how to see patterns in data and act on it.
  • Speech recognition and Language understanding – Meaning, being able to understand you when you are talking with all the little differences and nuance.

These days we can see it all come together in the Google Assistant. It allows you to have a conversation with Google and be more productive. In this post, we will see how it’s all working by building a new Action for Google home. In the same time, we will have a nice bot that in the future we will integrate with many apps. Cool? Continue reading

Standard
Chrome, JavaScript, webdev

Online Editors For Web Developers

One of the most powerful aspects of the web is the ability to share your ideas and work with others quickly.

Over the years, I tried several options to share code and do demos. It’s true that you can always start your own server and serve your site, but in many cases, you want to focus on your demo and not do administrative work again and again. Here are some tools that I enjoyed using and I still find myself returning to check them from time to time. In most of them you got a nice ability to move (even) faster and to use GitHub for your code. Continue reading

Standard
Chrome, JavaScript, webdev

Protect Your Website With HTTPS

TL;DR

  1. Create (for free) an SSL certificate.
    One resource for that is letsencrypt.org
  2. Install it on your website’s server: letsencrypt.org/docs/client-options/ – You just quickly choose the client that will match your server environment or do everything in your browser.
  3. Change all your website’s links from HTTP to HTTPS so that search engines are notified and users will get the HTTPS version.
  4. Go have a drink.

Why?

You should always protect all of your websites with HTTPS, even if they don’t handle sensitive communications. HTTPS helps prevent intruders from tampering with the communications between your websites and your users’ browsers. It might be a malicious attacker or legitimate (but intrusive) companies, such as ISPs or hotels that inject ads into pages. Your users will think that your site is ugly or worst because they can’t tell who is doing what to the pages.
If you care about your users, always protect them and serve them with HTTPS. It will also prevents intruders from being able to passively listen in on the communications between your website and your users. Another benefit we gain from HTTPS is the ability to work with new powerful web platform features: Continue reading

Standard