I had some issues with consistent frame-rates using Cordova on my Galaxy S5 phone. The fix was to use the Crosswalk Cordova plugin. This plugin comes with its own Chromium instance, which is far superior to the default webview provided by Android 6.0.
The con is a fatter APK, about 20MB – but the pro is a much more consistent experience.
Recently I have been working on a HTML5 game using Pixi.js. One issue I have come across when doing web game programming is that it is not possible to disable vsync to test my game with higher and lower FPS.
The window.requestAnimationFrame() fires before the next repaint and is therefore tied to the refresh-rate of the monitor in use. For a 60hz monitor, the function fires every 16.66ms.
One could create a custom interval timer to simulate different refresh rates. This works fairly well, although the update will for obvious reasons be out of sync with the monitor.
Another method is to change the refresh-rate of the monitor using INI patching on Windows or using GPU tools such as NVIDIA Control Panel. A monitor is designed for a specific refresh-rate, where 60hz is the most widely PC monitor refresh rate.
Depending on the monitor, it is sometimes possible to over-clock the monitor yielding higher refresh rate. Similarly, under-clocking can be use to reduce the refresh-rate. For my 60hz DELL 2515h monitor I can increase the refresh-rate to 80hz before the monitor goes blank.
This allows me to test different frame rates, while preserving vsync, when developing HTML5 games. Similarly, I can reduce the frame-rate by under-clocking the monitor to e.g. 50hz or 30hz.
For NVIDIA GPUs, changing refresh-rates can easily be done through the NVIDIA Control Panel:
The Test button will test the refresh rate before adding it to the list. When added, you can select the custom refresh rates from the drop-down menu to the right.
This can be done even when the game is loaded in the browser. A site such as https://www.vsynctester.com/ can be used to verify that the refresh rate of monitor is in effect in the browser.
Making pixel art has never been a hobby of mine until I stumbled upon 8bit Painter for Android. This app is a bitmap editor with very few features and a lot of constraints – however, this also makes it easy to use on a handheld device such as my Galaxy S5 phone.
Features more or less are:
Gallery list with all images made in the app.
Grid with each cell representing a single pixel.
Pan and Zoom
Fixed canvas sizes from 16 x 16 to 128 x 128, nothing customization here.
Ereaser, Pen, Fill and Picker tools.
Colorpicker with presets, brightness and saturation support.
Export to e.g. Google drive
Its an awesome app to use when idling with ones phone, e.g. in a meeting without an interesting agenda 🙂
I have tracked my daily weight and exercise since 2016. The primary motivation: I wanted to loss a bit of body mass and to do so it would be beneficial to track my progress.
The secondary motivation: I want to statistically calculate if my weight loss is primary due to exercising. This was my initial hypothesis since my weight fell dramatically after I began my exercising. Alas I could not keep the fast decline after a few months, and my new hypothesis is that exercise not the primary factor for weight loss in my case.
This also makes perfect sense, since it is very easy to eat too much during the day which is near to impossible to burn in the evening with the one-two hours of spare time. What does the data say?
For each day since 2016 I have an entry of current weight (measured in the morning) + how much exercise I got for the day. Typically, this is how much I rode my training bike in the evening. My initial hypothesis was that more exercise leads to more weight loss, but not necessarily the day after, i.e. training for 60 min one does not result in weight loss the next day but a few days after.
To simplify my data-set I summed all the daily values into weekly values and converted the weight into a weight changes, i.e. the delta between the first measure weight next week minus the weight on the first day of the week. My hypothesis was that there was a negative co-variance between exercise time and weight change, i.e. negative weight change with increasing exercise time.
As seen on the scatter plot, there is indeed a correlation between between exercise time (x-axis) and weight change (y-axis) and it is negative. It is far from perfect though, at does not explain that much. CORREL states that exercise time explains only 30% of the weight change, so 70% of the weight change is not explained by the data that I have collected.
Looking at the data it is clear that increasing exercise helps with weight loss. Getting 100-150 min of exercise during a week seems to be a reasonable choice to maximize weight loss. Beyond this the weight loss decreases in magnitude which I cannot explain.
Getting less than 50 min but more than 0 min of exercise every weeks clearly shows a negative weight loss trend, while getting 0 min of exercise shows a smaller weight gain.
Conclusion: it is important to exercise at-least 120 min a week while keeping in mind that exercise is not the primary factor for weight loss (only 30%).
I started this blog 1 year age. The motivation was 100% for fun and to see how many visitors and view I could get without any niche. I made roughly 64 posts (nice round number) spanning different topics, primarily programming related.
The stats of 2017 are shown here:
According to the stats I got about 500 views (41/month) and 250 visitors (20/month). Not anything to brag about and nowhere near the 100,000 views / month required to earn a decent amount of money on ads.
To increase the number of views, it is clearly required that one
Clearly defines a niche! not just any-topic as I have done.
Exposes the content through social media or other sites.
Improves the look and feel.
Self-hosts – using .wordpress.com looks a bit cheap.
Learn to write better.
Although I believe I have improved on the last point – I am nowhere near a blogging expert.
I really need to level up my game if I want to increase the number of views.
So for 2018, my goal is to see if I can reach 1000 views and 500 visitors.
I recently encountered a problem with one of my many Azure services. The service in question provides an API to download files from a Azure file share; this worked perfectly on some endpoints but not on others.
It took me a while to nail the issue which was due to a violation of MinResponseData rate limit in Kestrel. On endpoints with a stable Internet connection, everything was OK, but on others were the Internet connection was less stable the download frequently failed.
Even if the endpoint had OK bandwidth, the download would still fail since the connection might be gone for a few seconds. According to the docs:
Defaults to 240 bytes/second with a 5 second grace period.