My Blog

Sharing programming insights since 2015. 160 articles (and counting!) filled with real-world experience and practical tips.

    Define the width of every column in a HTML-table and show only one line of text per table-row by using the ellipsis character

    A very old HTML best practice suggests that we should not use tables to structure the HTML elements inside a webpage. This solution was used extensively a decade ago, and for this reason tables got a very bad reputation in the web community. However, using tables in your HTML code for structuring and presenting a set of data is still a valid option.

    When you use a table with multiple columns, you often want to define the width for each of the columns of the table.

    Read the complete article

    How to test the HTML elements and their DOM properties with the Jasmine framework

    When you test your JavaScript code you often want to test the user interactions with the UI of your web application and not just its logic. Testing the UI makes even more sense if you use a JS-framework which offers a list of UI controls.

    Consider the following use-cases that could be unit tested:

    Read the complete article

    Split the words out of a string and reverse their order with JavaScript

    You want to achieve the following tasks with JavaScript:

    Let’s see how you can split a string based on its words. There are two simple options.

    Read the complete article

    The this keyword in JavaScript - Must Know JavaScript features every programmer should learn to master the language

    The previous days I had a great conversation about the fundamentals of JavaScript, scope, closure, etc.. The this keyword was also a discussion point. I wasn’t 100% sure of the rules that apply to this and I wanted to refresh my memory about the possible ways to use the keyword and for each case identify the owner of this when a function is invoked.

    Read the complete article

    Hints and tips for better programming with the React Native framework

    Based on my current experience with the React Native framework, I would like to share with you some hints and tips that will improve your skills in the way you develop with the framework.

    Isolate the business logic of your application from the UI/ components code

    This is probably the most valuable information someone should have in her mind when developing with React Native. React Native tries to be as platform independent as possible, however, there will be cases, that you will have to write different JavaScript code for iOS and different code for Android.

    Read the complete article