Kivy is a python framework you can use to develop apps for Linux, Windows, OS X, Android and iOS. It’s very common to create your folder to store some information which you can access across sessions. But things always get interesting in a across platforms framework since different behaviours for each platforms. Let’s discuss them all.
Previously, I answered several questions on Stackoverflow.com about how to share values among different Kivy. In fact, you can handle it in a python way without using kivy framework at all. Here I will conclude both Kivy way and python way.
Previously, when I tried to set up
HMR for my own React develop environment, I encountered a weird thing, I followed the official tutorial, and still can’t get it work, it’s interesting to see that there is no error message. All the messages indicate that the system thinks it should work as expected. But actually it’s not.
This is how I made it work at last, think it worths a note. And I contributed a pull request to the official webpack documents and gets accepted.
I’m not a big fan of black magic, especially when I set up my development environment. Every module I have installed, I want to know exactly what problem does it solve. And every feature I have used, I want to know how to customize it to suit my needs. You could use create-react-app, but I like to manage all the things by my own hands because I always have so many things which I want to tweak my way.
Now let’s set up a React environment with Tests, ES6 and bundle enabled (With HMR).
We’ll go through every step and explain why we need that module.
Recently, I have refactored a legacy code base. It’s a mobile app written via python and using a framework named Kivy. It’s quite a happy experience since the old one is good start for a refactoring, one folder to hold all files, one file to hold all logic, useless-over-complex logic, everything clued together,
global comes from nowhere, no naming conventions.
We don’t only deliver products, but also clean code base. That’s what we do for a living.
Most the experiences below comes from my previous practices of mobile dev, web dev and back-end dev. But without any surprising, they all fit in this project. And they should be adaptable to all languages as well.
Recently I finished my last paper for my study programm - Game Development, the final project is a 2D fighting game developed using Unity, I am responsible for anything related to the enemy (AI, state machine, animation tree, including Boss), openning cut scene, and a QTE(quick time event) system as well. We did a pretty well job and finally get a A+ for this paper. But still lots of lessons have been learned through the whole procedure. The biggest lesson is the coding pattern for a character which heavily relies on animation.
A game is all about animation, your character plays different animations according to different states. When you develop a 2D game,sometimes you might need to change the direction that your character faces, it requires different animations, and if your game is a 8 direction game, it will be 8 animations for each action (run, walk, shoot, etc). It is a nightmare to create them in the animation view and transition them in code.
syntax error for ES6 code or
No coverage information was collected, I finally found an relative elegant way to solve.
Previously, when I tried to debug the failed test in mocha, I start mocha in bash with
--debug-brk, and attached the Visual Studio Code to that mocha process. My code is written in ES6, and I run mocha via
babel-register. When I tried to enjoy the built-in debug function in VSC. Somehow, the stack seems completely irrelative to the actual code. Take me a while to figure it out. I searched a lot online, assembled all the information to solve the problem, I think it worths a blog to save someone else time.
When you are developing some cross platform apps, React native, Phonegap, Kivy, Native script, etc. It’s very usual that you need to install the package to the real device, and it’s totally fine for you to manually install the compiled APK. But if you want more productivity, you need use the
adb command. Let’s get a quick look for all of these.