Skip to main content

Posts

Showing posts from 2017

How to create a patch for a python-for-android recipe

Since it's not documented well I thought I'd do a post on how to create a patch for a python-for-android recipe.

If you have to modify an existing recipe you can get the source package p4a downloads from ~/.local/share/python-for-android/packages/<recipe-name>.

This is typically a tar.gz or zipped source bundle. Extract it and create a copy. Rename the copy to something like "<recipe-name>-patched" or simply "patched".

I'm working with the openssl recipe, so mine looks like this

Kivy vs Enaml native - A comparision

Since it was asked on HackerNews I thought I'd do a post that compares Kivy and enaml-native.  This should help you to decide which framework to choose to use when and why as they both have pros and cons.

Let me also state that I'm the author of enaml-native and thus I cannot give a truly unbiased comparison. With that aside. Let's begin.

Goals Kivy and enaml-native have similar but slightly different goals. Kivy's tagline is "Open source UI framework written in Python" while enaml-native's is "Build native mobile apps in python with enaml".  Kivy aims to support desktop (windows, mac, linux), mobile (android, ios), and the raspberry pi. enaml-native targets only iOS and android (as enaml already does windows, mac, and linux).

The huge difference between the two here is that Kivy has it's own widget framework, while enaml and enaml-native use native widgets.  The rest is about the same. They're both made for building apps/programs in pyth…

KDE Connect - The best desktop and mobile integration app ever

I reviewed this on the app store, but also wanted to do a post on this app because it deserves it. KDE connect is an app for Android that integrates your phone with the KDE plasma desktop (ex KDE neon) and it's awesome.



Download it here:
KDE connect app


 Setup is easy First, setup is easy, It connects over wifi and automatically finds your computers in the app (you have to register it on the computer but that's also simple).  After that it just works all the time. Whenever your connected to wifi everything is synced. Oh, and it works with multiple systems!


Remote audio control
I often use my pc to play music using pithos to my home speakers over bluetooth as it has no ads. Sometimes I'm in another room and I leave it on and for whatever reason I want to pause or play the music. It's stupid simple to do with KDE connect.  Open the app, it lists all the opened media devices and lets you pick one, pause/play, skip/back, and change the volume remotely!





Message notifications…

Triplebyte fun or not

This probably breaks their terms, but facebook keeps annoying me with ads for Triplebyte so I decided to spend a few minutes to go through one of their tests to see how I fared.



The first question is pretty easy. Instead of spending a few minutes to see what the function does, being a lazy typical engineer, I just pasted into the chrome dev console. I guess they assume everyone is a javascript dev.

Next they collect all your information, I assume so they can farm it out even if you don't fare to well, haven't read the terms. Then you to pick a quiz. I chose the Android one, and well 30 minutes or so later I got to schedule an interview.



I was pretty upset that they gave no indication of my score. Instead of helping me actually learn what I may have got wrong with the 30 minutes I spent taking the test, they could at least say a percentage. I get they don't want to let people cheat, but come on, what a ripoff for my time.

So for kicks, I went and answered everything wrong t…

Timeouts with Django channels on dokku

Since I spent hours figuring this out. If you're trying to use django-channels with daphne on dokku and you see any of the following issues:

Server is hanging nginx is giving you timeouts, "504 Gateway time-out" errors.Your logs show "upstream timed out (110: Connection timed out)" Make sure your worker process is actually running!  Run `dokku ps <app>`  and make sure there are TWO python processes!  Turns out that even if you have both commands in the Procfile but the scale is not set it just ignores the second command!

I had to add a DOKKU_SCALE file as described in manually-managing-process-scaling.

Cheers!

Don't bank on open source backing

There's a bunch of websites that let you become a backer of open source software or back an issue. In my opinion trying to get "funding" from these is a complete a waste of time and effort. Generally speaking, the providers of these services and only a small portion of the users benefit and make any the money. Lets look at a few numbers to see why.

OpenCollective  Url - https://opencollective.com/opensource
Fee - 5%



On their home page you see the estimated annual budget, currently at $525k / year and 309 projects.  Wow $525k! But wait, scroll down to the collectives and you see webpack is getting about HALF of that ($241k). So do the math if we exclude the outlier (webpack) the average project makes a whopping  $920 per year or about $80/month.  The average US engineer will make that monthly amount in about 1-2 hours. Most of these open source projects I'm sure have several hundred ours of work behind them. It just doesn't make sense. Oh and I forgot to mention t…