Kotlin

It’s the new(est) kid on the the JVM block. It’s from JetBrains, they’re the guys who built IntelliJ. They’ve been around for quite some time, so chances are you already know them. Kotlin has also been around for quite sometime, since 2011 in fact — it gained a lot of traction and attention probably 2016 or 2017 (I’m not sure, I’m too lazy to research). The “hooray” moment for Kotlin was probably during Google I/O 2017, because they (Google) announced that it can now be used for Android programming.
Read more...

Android Studio

What to configure - this is part of the book Coding preferences - no need for this Common shortcuts - yes Common task you need to perform - I will do this, I will add this as part of the book refactor find some thing across projects TODO lists marking blocks of code for commenting Project organization - yes Project settings - yes Java 10 - A small clause.
Read more...

Collections

The Kotlin collections are actually direct instances of the collections in the JDK. There’s no conversion of wrapping involved. So, if you didn’t skimp on your study of collections while you were in Java, that will certainly come in handy now. Although Kotlin didn’t define its own collections code, it did add quite a few convenience functions to the framework, which is a welcome addition because it makes the collections easier to work with.
Read more...

Higher Order Functions

The name higher order functions come from the world of Mathematics, in there, a higher order function is also called functional, functional form or functor, and apparently, they take the difference between function and values, a bit more seriously than programming folks. NOTE It makes me wonder if there a thing such as “lower order functions”, I don’t think this term was ever used, neither in programming nor in the world of Math.
Read more...

Die Empty

There are 3 kinds of work Mapping - Prioritizing, planning and setting of objectives Meshing - Sharpening the saw. This is an important determinant of long-term sucess. I’ts difficult to justify this because it’s not tied directly to results Making - Performing work that actually crosses out the items in your todo list. This is “doing the work”. You have a work product. Producing something of value You need to be purposeful in engaging these three kinds of work.
Read more...

Python

Preface material Who is this for? It’s for a beginning programmer, but I’m assuming this isn’t your first programming language — HTML doesn’t count, but if you coded a bit of JavaScript, then that counts. The very fundamentals of coding won’t be tackled in here. I’m already assuming that your quite familiar with some of the tenets of imperative programming, like, statements are arranged in sequence, they execute one after another unless redirected by a branching construct like an if, or a looping construct like a do; or variables can hold data, they have a memory address and we can replace that data whenever we like — stuff like that.
Read more...

Python Exercises

Photo credit xckd.com/189 Exer 1. Ask the user for input, then greet the user. Store the user’s response in a variable and print it out. Exer 2. Ask the user the year he was born, then print out his age. Exer 3. Print a triangle of asterisk, see the output below * ** *** **** ***** ****** ******* ******** ********* There are 10 asterisk on the last line of the printed output
Read more...

Nodejs

Node scripts are not that different from the other JS scripts you’ve written in the past. You also need to put them on a filename with a .js extension. While nodeJS programs can be constructed in the REPL, that’s not how we will run the example scripts in this notes. Unless I specify otherwise, when you see a listing like the following; Listing 1 - hellonode.js setTimeout(()=> { console.log("Hello"); }, 3000); console.
Read more...

macOS Cheatsheet

Routing table The routing table does not show using route print in OSX, this may have worked in Linux but not here. Use the command netstat -nr instead Show/Hide hidden files Finder The OSX Finder does not show hidden files by default. A file is hidden if the name starts with a dot or period e.g. .bash_profile, .emacs.d etc. If you want to see these kinds of files in the Finder, execute this commands using the Terminal.
Read more...

Linux Cheatsheet

Copy pasting clipboard to/from terminal Can be done either via xsel or xclip. Xclip is part of most modern installations, so you it may be there in your installation already. The common usages are: You copied something in an X window (browser or editor etc), you want to paste the content to the terminal. Unfortunately the terminal doesn’t have access to the clipboard. But you can do this on the terminal using
Read more...