Erlang Functions

When programming Erlang, you should think like you are writing an English essay. In Erlang, functions are not very different to what a traditional programming language offers, but they are written very differently in Erlang. To declare a function in the Erlang Repl, you will have to use the fun keyword. Name = fun(X) -> X. The above code will store the the declaration of a function called Name and would receive an argument called X....

June 21, 2021 · 3 min · Aleem Isiaka

Erlang Pattern Matching

If you come from a conventional programming language background, the way Erlang handles assignment is expected to look wonky, but it is not. There is nothing like an assignment in Erlang programming language; there is a different approach to accessing values in memory, which is the pattern-matching operations. With Java, PHP, Python, C, C++, and likes, the = symbol implies take the values from the right, and store it into the memory, then give me the reference of the location in memory and store it in the expression at the left....

June 15, 2021 · 4 min · Aleem Isiaka

Erlang Variables

If you have worked with other languages like JavaScript, Java, Python etc, you would be surprised by what Erlang understands as variable. In Erlang, variables starts with uppercase letter, thus, C, X, Ape, Ant are all valid identifiers for Erlang variables. Variables can not start with lowercase letter or begin with a number. Erlang variables can include can alphanumeric characters, an underscore and @ symbol. X = 1. %% Valid y = 2....

June 14, 2021 · 2 min · Aleem Isiaka

CSS action pseudo classes

Without JavaScript, dynamic UI is possible with just CSS action class selectors. Case study Help text for input element which is only visible when the input is focused. The HTML <div class="input-cont"> <input type="text" placeholder="Focus me" autofocus /> <span class="help" data-help="Enter your email"></span> </div> To achieve the above, a span holding the help text in a data-help attribute as a sibling to the actual input. Both the input and the span are children to a parent div with class name input-cont....

June 13, 2021 · 3 min · Aleem Isiaka

An introduction to Erlang

If you have used WhatsApp or Facebook Chat, then you have one way or the other interacted with an Erlang-backed system. Erlang is a language created for the telecommunication industry by Jor Armstrong, Robert Virding, and Mike Williams in 1986. It was recorded that Jor Armstrong claimed he was provided a library and did not know what to do with it, then they taught him to solve the reliability and concurrent problem of the telecommunication industry, and that gave birth to Erlang....

June 12, 2021 · 2 min · Aleem Isiaka

CSS counters

CSS can keep count of numbers without writing any additional JavaScript. It does this by taking note the amount of time a CSS block affects a page then incrementing the counter for that block if the counter-increment rule is implemented. For example: input:invalid { counter-increment: invalid-count; } With no JavaScript at all, CSS understands that whenever there is an invalid element, it should increment the count for the invalid-count identifier....

June 7, 2021 · 2 min · Aleem Isiaka

Structural CSS Selectors

Yeah, you read that right. Let go straight into it! A Test Case Can you interprete this CSS selector query? p.title:first-of-type { color: red; } Let me think like you would: Select every P element that has the class name of title and apply the color red to the first of its type. <body> <p>Lorem Ipsum</p> <p class="title">Paragraph 2 (shows in red color)</p> </body> You think you’re right. Another test case What happens with the below:...

June 5, 2021 · 3 min · Aleem Isiaka

How to enable background Audio Play in iOS React Native

Open ios/{APP_NAME}/Info.plist. Add <plist> <dict> ... ... ... <key>UIBackgroundModes</key> <array> <string>audio</string> </array> </dict> </plist> Press r on the metro terminal Voila!

May 27, 2021 · 1 min · Aleem Isiaka

Configure Rollup to bundle Axios module

npm install rollup-plugin-node-resolve rollup-plugin-json. Add it to the plugins inside rollup.config.js // Rollup configuration ... plugins: [ rollupNodeResolve({ jsnext: true, preferBuiltins: true, browser: true }), rollupJson(), ... ] ** Notice the browser: true ** Run your build again: yarn run build Voila! Source

May 25, 2021 · 1 min · Aleem Isiaka

How to create Application Icon (Appstore | Playstore)

To make Application Icons for both iOS and Android, use https://appicon.co/ The advantage of appicon.co is that after adding the base icon image, it generates the set of standard icons, and automatically downloads them to a ZIP file named: AppIcons. Extract the zip archive, it contains appstore.png: For Apple AppStore playstore.png: For Google playstore android/: A folder of standard Icons for Android Assets.xcassets: A folder of standard Icons for iOS

May 24, 2021 · 1 min · Aleem Isiaka