I worked as an Android developer just over two years ago, creating native apps for clients using Java and Kotlin. During that time, Kotlin was gaining prominence and had just been made official by Google. Google also introduced Architecture Components that year, later renamed to JetPack. Since then, the Android ecosystem has changed significantly, with Kotlin and JetPack gaining significant maturity and development. Out with Realm, Activities, and Model-View-Presenter (MVP), in with Room, fragment-based architecture, and MVVM. Data-binding and MVVM are pretty awesome and breathe a whole new life into Android app development.
5461-20 of 44 posts
Sandboxes can protect the user’s computer from malicious or buggy scripts. But sandboxes are difficult to get right; you need to be very careful with what you expose, and make sure you test for vulnerabilities. The Sandboxes on the Lua wiki is required reading, as it contains very helpful advice.
1979Drop shadows are created using a Gaussian blur drawn underneath the original element. You can do this using either a fixed texture or a post-processing fragment shader.
740Data binding greatly reduces the amount of code you need to connect user-interfaces with ViewModels. It keeps Activity and Fragment code small, and makes it easier to manage lifecycles.
I discovered that there was no attribute to bind the elements in a RecyclerView, due to the fact that a RecyclerView needs an adapter to be able to create element views. It would also be nice to automatically use data binding to create the viewholders. There are a number of guides to do both of these halves, but I now present the code to do the whole.
987Ruben’s Virtual World Project is a game I’ve been working on for almost 4 years now. Recently I rewrote the rendering code to support voxel lighting and multiple z-level - heights of the map.
1216Youtube Music is a great way to listen for music for free, and with no adverts if you use an adblocker. There is one annoying problem however: after listening for a while, Youtube will keep pausing the music to show a dialog which says “Are you still listening?”. This article will show how to automatically confirm the dialog.
303Google’s C++ testing library has a nice syntax for registering tests, without needing to remember to add the tests to some central index. This article will show how to use macros to allow the creation of tests using only the following code:
Test(IntegerComparisonTest) {
int a = 3;
assert(a == 3);
}
I wrote a raytracer and a rasteriser as part of my university course. The raytracer supported features such as indirect lighting, reflection, refraction, and a photon mapper capable of simulating the final positions of 60,000,000 photons in a few minutes (and quite a few GBs of RAM).
826During the second year of university, I created a kernel for the ARMv7 instruction set. I went above and beyond what was required on this project, achieving a clean design and features such as a blocked process queue, piping, kill, and a simple filesystem. This was my favourite coursework so far. I found it very interesting to learn about and implement the things that we take for granted as programmers.
567For the last two years, I have been working on a very ambitious game. The game is a top-down sandbox with multiplayer support. I’m aiming towards a city-based game, where players can wander around a procedurally generated city. One of the main reasons I started creating this game is to learn about multiplayer networking at a low level - client-side prediction, server-side reconcilliation, cheat preventation, and reducing the visual effect of latency.
8231-20 of 44 posts