The place where random ideas get written down and lost in time.
2019-08-01 - Raspberry Pi 4
Category DEVIn the "don't need one right now, just doing my research" department...
There's a new RPi 4 out there, announced in June, and this is a pretty good and balanced review:
https://www.techrepublic.com/article/raspberry-pi-4-model-b-review-this-board-really-can-replace-your-pc/
Direct comparison to the previous RPi 3:
https://www.androidcentral.com/raspberry-pi-4-vs-raspberry-pi-3
As always with the Pi, there's the hype and reality:
- Element14 (Newark) the official distributor is waiting for stock for the 4 GB version. They sell it at the official MSRP of $55 (+ s/h) bare-bones.
- Amazon: Can't find a bare-bone one, but there are kits for the 4 GB version (with power supply, etc) for $99 (also waiting for stock). (example 1 and example 2 ... these are good kits)
When comparing to "something else", the "kit" price is often a better indicator in my book since we're often comparing it with another mini-PC that has a power supply, storage, and a box. In this respect, it's interesting: years ago I was expecting a full RPi 2 kit to be around $100, and here a full RPi 4 kit is still around $100.
Video review from Andreas [link?]:
- Speed is only 30% marginally faster in tests.
- Can get really hot during intensive computation.
- Ethernet speed is now good.
- Nowhere near a “desktop” computer beside claims.
- Micro HDMI instead of full size HDMI.
Perf benchmark:
https://core-electronics.com.au/tutorials/raspberry-pi-4-vs-3-model-b-performance-benchmark.html
The dual HDMI output can be a good solution for building e.g. a public display.
2019-07-21 - Cocos2d
Category DEVIn the Instant Apps for Game on the Play dev guide, I noticed they officially support a plugin for Unity as well as one for Cocos2d.
It would be interesting to try this to see how an android game can be made using that: https://cocos2d-x.org/
https://digitalocean.cocos2d-x.org/CocosCreator/v2.1.2/CocosCreator_v2.1.2_20190716_win.7z
513 MB download… will skip for PA.
The quick start here:
https://docs.cocos2d-x.org/creator/manual/en/getting-started/quick-start.html
Shows:
- It seems to come with an editor, kinda like Unity. Asset library, etc.
- Programmed using JS, CoffeeScript, or TypeScript.
- The example uses the “old” property-dict style for creating a JS class.
- “Custom components” are JS classes with properties.
- Creator “nodes” are manipulated.
- A custom “jump action” is created by combining interpolators.
- Typical key events handling.
- “Prefabs” are used to duplicate assets.
- Object collision is programmatingly done by computing asset-to-player distance.
- Overall “score” audio and effects.
Overall it seems like a (suitable?) replacement for Unity in 2d, as long as JS is acceptable. Using TypeScript or CoffeeScript may make the JS a tad more palatable. Integration with Android remains to be seen, as well as runtime size.
2019-06-28 - The MCVP pattern
Category DEVA while ago I wanted to take a consistent approach at splitting my projects into a “UI vs core” pattern. My old C# skeleton generated 2 libs upfront for that. In other android apps, I have either an android lib or at least clear packages “core vs ui”.
Looking at something like Flutter, the benefits would be useful if the app and UI is using one framework and then the “core” of the app uses another framework, namely a POJO or at least an Android lib. In the case of a game, the latter could be a Unity library.
When doing a pure Android app of a limited scope, there’s little value in that separation. It becomes more useful when I try alternate frameworks, for example Flutter or Kotlin. The idea is that if I write the UI part in Flutter now and the framework falls in desuetude, I could rewrite just the UI later.
One thing I noticed is that if I do not force myself to do the split upfront using actual libraries, it will not happen easily after. Forcing to have an android app + an android lib imposes some constraints in the import/dependency structure. It forces us to make callbacks instead of direct bi-directional calls. It forces us to make the boundaries clear. Dagger would help a bit to ease using one with the other.
As far as patterns go, there’s MVP and MVC. I suggest a mix, which I’m calling MCVP:
- Model: Model data/classes, in the core feature library.
- Controllers: Action classes acting solely on the model, in the core feature library.
- Views: Pure UI elements display model, in the app/ui library.
- Presenters: Action classes managing the interaction, in the app/ui library.
The app logic would be both in controllers and presenters. The controllers are purely model-oriented and by having them in the core lib, they have no impact on the UI. The presenters on the other hand coordinate between the views, model, and controllers. They are the “business logic” that is located at the app/ui level.
As a graph, we would have:
[model] ⇐⇒ [controllers] ⇐⇒ [presenters] ⇐⇒ [views]
2019-06-27 - Flutter
Category DEVIt’s time to get a look at Flutter… What would this be good for?
https://flutter.dev/docs/get-started/install/windows
Now the question is what will be the throw-away project and the goal for it?
One thing Flutter targets is Android vs iOS and then “rescalable” app for Chrome OS.
It does not do “web apps” per se. It is not a server-side html thing.
2019-04-08 - Summer Project
Category DEVI was going to start a “Service [idea]” doc as a Summer Project, but honestly at that point it’s more like a reboot as it feels really deja-vu:
- Menerba is the obvious canonical example.
- Home Monitor App.
Not every far:
- Mobile dev and Hint v3.
- Ikaria and Ikaria v2.
- And of course “\pɔʁt.na.wak\” as a meta-meta project.
Part of the motivation for Portnawak was exactly what the name says, it’s a place to put temporary projects without the pretense of ever finishing them. They can be left there and not be too visible, so it’s not an inconvenience to anyone.
2019-01-17 - BBC MicroBit
Category DEVThis looks worth looking into for the kids:
https://microbit.org/guide/quick/
Should be around $17 per kit.
https://www.adafruit.com/product/3362 (properly packaged I guess)
https://amzn.to/2Dh7Wb7 (not the full kit, see comments)
Showed that to the kids. Is it interesting? Maybe. Should I get one? Nah. OK fine I tried.
Of note:
- RPi 1 = 700 MHz Arm11
- RPi 2 = 900 MHz ARM Cortex-A7, 1 GB RAM (all 2 and 3 models)
- RPi 2 = 900 MHz ARM Cortex-A53
- RPi 3 = 1.2 GHz ARM Cortex-A53, arm64.
- RPi 3 B+ = 1.4 GHz ARMv8, arm64, 1 GB RAM.
- USB/Eth combined with 30 MB/s max.
https://www.zdnet.com/pictures/top-12-raspberry-pi-alternatives-2018-edition/
Similar clones:
- NanoPi NEO4, $45
- Rockpi4
- Libre.Computer “Le Potato”, $45 on Amazon with 2 GB RAM
- UDOO makes the NEO (an RPi like), an x86+arduino, and the Dual is some kind of Android/Arduino DUE mix. One has SATA.
- VoCore has a super-mini linux box (1 inch square), limited RAM, etc.
Depends on needs:
- For very low computing, the VoCore seems interesting. The Nano/Rock Pi are just clones with no specific advantages (cpu speed maybe?)
- Le Potato looks interesting, until one reads the comments about the limits of the Linux distro with specific builds made for it.
The problem with those is the custom linux kernels. It means no “default debian” install (even with the RPi3), but at least Raspbian is well maintained (and the official way to go). For some of the other boards, the deal is more muddy, with typically a single image to deal with, no updates. For example the BeagleBoards have precompiled kernels and linux images to be installed as a whole. This is good from an IoT “fire and forget” standpoint but much less attractive to customize the distro & keep up-to-date with security patches.
Maybe I should take another look at BeagleBone/Board (board matrix): the Black is a bit under an RPi 3 (1 GHz Arm A8, 512 MB RAM, $65 Amazon, $55+s/h e14/mouser), the SanCloud version has 1 GB RAM & Gigabit eth ($60-80). [Note: names were BeagleBoard before 2010, and BeagleBone after 2010].
I happen to have a BeagleBone Black. I should use it. Which rev? What specs?
- Markings: “PCB Rev B3” (in black other side of power plug). “STM-5 94V-0 1013” next to eth, proc “XAM3359AZCZ100”, eMMC U13 “3DA18 JW896”, DDR3 U12 “2ZE12 D9PXV”.
- BeagleBoard images & instructions: https://beagleboard.org/latest-images
- List of revision changes: https://elinux.org/Beagleboard:BeagleBoneBlack#Board_Revisions_and_Changes
- Rev B has 2 GB of eMMC (Armstrong Linux pre-installed); Rev C has 4 GB of eMMC with Debian pre-installed.
- The one I have appears thus to be a Rev B with 2 GB of eMMC.
- Confirmed by eMMC Micron JW896 [FBGA part search] ⇒ Micro part MTFC2GMVEA-0M WT, and “MT FC 2G” is the Micron model code for a 2 GB NAND Flash [link].
2018-12-25 - Dart
Category DEVHere’s a random idea: try Dart for a web project.
Here’s another random idea: While not rewrite Track for the web?
- Data files provided by a web server.
- User accounts and all that: Firebase.
- 2d canvas editor.
- 3d view in browser?
One thing from “\pɔʁt.na.wak\” experiment is that editing in 3d is a PITA. I should focus on a 2d editor and then adapt it to 3d as it’s not my strong point.
Also I didn’t like the model I had in Track, especially the connectors. It seemed like a good idea initially but ended up troublesome. Tests were inadequate.
If I wanted to try Dart, there are 2 other possible projects:
- Rewrite Wazz.
- A bit moot since there’s nothing complicated nor wrong with the current version. It could be an interesting test to get a direct comparison between Dart and pure JS ES6.
- Write a simple single-page web-page game. Nerdkill for example ;-)
Next thing to try: Windows Linux Subsystem.
Can it replace Cygwin?
Does it integrate nicely with win ntfs / apps?
[Summary from the FAQ] ⇒ Provides a bash shell and /mnt access to the win fs. Does not provide GUI support. Mentions apt-get (with potential errors due to a lack of udev).
I should also (re)learn Powershell (again and/or for real) and take cheat notes on how to be proficient / use it.
2018-10-07 - Wyze App
Category DEVDesktop app to access Wyze cams.
The TinyCam code seems easily reversible, and could be done as a desktop app instead of android.
To play an h264 stream, have a look at JavaCV https://github.com/bytedeco/javacv (Java wrappers around OpenCV ... can be useful for a lot of other applications).
In that specific case, a C# app might be better than Java as main target is Windows (potentially cross-platform with MonoDevelop, not sure if it’s even worth bothering here).
It’s a throw-away prototype, so failure is an option. The simplified goals would be:
- Start by simulating whatever tinycam came up with, because it’s an easy start.
- TinyCam only takes care of discovering and connecting to local live feeds.
- Need to realize this is not my end goal. What I want is really:
- View remote notifications.
- View remote live feeds.
- View remote playback feeds.
- Doing this would probably looking at the wyze apk with an ssl proxy to capture the json payloads.
Doing it in C# would be also a good exercise to do an UWP.
https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide
UWP:
- Requires/useful if using the Windows App Store
- Can be sideloaded in Win 10 if device is set in dev mode.
- APIs access to Win 10 features: Tiles, badges, Cortana, bunch of other crap.
- Various languages/UI combos supported: JS HTML, C# XAML, C++ DirectX.
So maybe UWP is overkill in this case. Just stick to a regular C# desktop with the old style C# gui builder. Use VS Community, and expect it to be ages behind in terms of code completion.
Why not a web app instead of a desktop app?
- Live viewing should work using any web page that can play an h264 feed. “In theory”?
- In the mobile app, notifications are seen using a download + local player. A web app could use local storage and/or just stream the video feed.
So it’s worth investigating, even if it turns out to not work well.
Results (done in JS):