After trying out more than 40 different languages with varying results, I wanted to share the absolute worst language designs I have seen. Just my opinion though, don’t be mad 😄
I don’t want to judge a language based on what it is missing, rather on what it has, but implemented poorly.
For example, I do not like Go because it doesn’t have generics, but that doesn’t mean it’s inherently a bad language.
I could go on about esoteric languages like Brainfuck, as they lack basically everything, but there’s no point in that.
I really wonder who thought it was a good idea to change the fundamental operators. …
I have been active on various competitive coding sites for over 4 years, and have solved over a thousand different problems, using 40+ different languages.
If you attempt that many problems, you will eventually stumble upon a few where you just find the perfect solution. Or at least solve it so elegantly that it gets upvoted to the top.
I decided to collect some of my most upvoted solutions, where I am also the original author and no one else had the same solution.
Given a 2d array representing a sudoku, validate whether it has been solved correctly:
If you have started many android projects, you have probably experienced having to re-invent the wheel multiple times. Or perhaps you copy-pasted some code from an old project and spent some time refactoring it to fit your new design.
I bet you have made or at least seen an onboarding like this:
Logo, Title, Info text, Image, button, Page indicator..
Let’s see how we can make a generic onboarding like this, and then just copy paste the entire thing into our next projects.
First off we’re going to need some dependencies:
We’ll make a new folder onboarding
with:
OnboardingPage.kt
OnboardingFragment.kt
…Is it possible to write pure functional android apps? Many argue for flutter, react native, and lately jetpack compose due to their declarative style, but are they really necessary, or can we do the same by utilising the full power of the android ecosystem?
I will not go much into what functional programming is. There are already many blog posts about replacing var
with val
, use LiveData
as atoms instead of var
, copying objects instead of mutating them etc. They solve a lot of problems, but they're not truly functional. Unless you know what you are doing, your MutableLiveData
might as well be a var
and your .copy()
…
About