Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Thursday, September 2, 2021

Year 3: My NFL Score Prediction App on the Google Play Store

I'm about to kick off my third consecutive year as an app developer with my NFL Score Prediction app on the Google Play Store.

I started work on this application in January of 2016, over five years ago. Since then the web app has gone through various iterations, and over the past three years I've solidified some of design concepts.

One of the biggest design decisions for me was to make the application anonymous. To pay homage of the Internet of yesteryear, I only ask for a username and a password. I don't collect E-mail addresses, physical addresses, phone numbers, ask you for your identity, or anything. Why not?

Let's face it. This is an application that collects score predictions for football games. Do I really need to know anything else from my users? Nope. It's just for fun. It's not that serious.

One of the new functionalities for this year (2021-22)

Some updates for this year include a page that tracks your accuracy with some "visual analytics" which are in fact, bar graphs. I've also included the ability to view any users progress, whereas in the past I limited the Leaderboard to the Top 25 users only.

Some features that I should probably include going forward are: Detailed tracking of wrong and inaccurate predictions, and the ability to share your prowess with a "Share" button social media, maybe a button to randomize picks for each week. Just some ideas.

To help promote this app, I've started filming some YouTube videos where I break down my predictions.

As the season progresses I will upload some more videos to showcase the application. - Mike


Tuesday, May 26, 2020

My NFL Score prediction app: Year 2 on the Google Play Store

I just updated my NFL Score Prediction game app. We are now entering Year #2 on the Google Play Store. You can download the application here (Android users, Google Play Store).
 
If you want to use the app, but do not have an Android phone, visit the direct URL: NFLScoreApp.com

The annual maintenance took me about 3-4 hours of work. This involved inputting the 2020 NFL schedule and resetting various internal knobs and levers. Not bad from a time standpoint... Although I will admit, I'm pretty lazy and I thought about just throwing my hands up and not renewing my server space about an hour in.

https://play.google.com/store/apps/details?id=xyz.appmaker.nbwebh&hl=en_US

It was pretty nice out today, so I missed out on the great weather but instead was stuck inside staring at the computer screen, which is one reason I left the tech industry to begin with, but whatever.

The application costs $20 a year for the server space and it cost me a one-time fee of $25 to become a Google Developer, so from a money standpoint, it's not a huge waste of money. It amounts to a couple of magazine subscriptions, more or less.

https://play.google.com/store/apps/details?id=xyz.appmaker.nbwebh&hl=en_US

This year (as opposed to 2019) I opened up the free app download to every single country that's available in the Google Play store. Last year I only had the application available to the U.S.A. and the United Kingdom.

Some improvements I made for the 2020 NFL Schedule: There is now a "My Stats" page that shows some bar graphs about your level of participation and gives your definitive ranking.

I redesigned the navigation to simplify it.

I limited the Leaderboard to the Top 25 users only.

I'm not sure how long I will continue to keep this app active, but I'm satisfied with how it's working as of now. I still believe in my concept, but I'd need major help to bring it to the next level.

If you are interested in working on or buying this application, i.e. purchasing the source code outright, shoot me an email. My address is listed on my "About Me" page on blogger. - Mike

Sunday, August 6, 2017

But what about... the problem with the tech industry

Over the process of attempting to secure another full-time position in the technology field I've reached an impasse of 'no return' considerations. Online and paper job applications are sent out, sixty to a hundred at a time (over the course of a couple of weeks), and there are replies. The phone screen, the phone interview, the in-person interview, the committee interview, the HR interview, the phone calls with status inquiry, the final interviews with the manager, the weeks of waiting with no response, I've seen and done it all. Several times over. And yet, I've not received any offers to my liking. Why would I want to work for a company that mistreats me during the interview? Yes, this has happened. However, the most common phrase I've heard during interviews is, "But what about..."  Fill in the blank.

It could be anything.  And this, in my opinion, is the problem with the tech field. There's always something else. So you're an expert at PHP, or writing Javascript. So what?


What about CakePHP and Zend, and Elastic Beanstalk, and Bamboo, and CodeIgnite, and Perl, and Python, and C++ and Informatica, and Unit Tests in C? Mulesoft? You can literally go on forever with endless flavors of technology as components (and their subcomponents). Platforms, code languages, stack varieties, specializations... Are you an expert in VOIP and subnets? How about traffic masking, or sub-routing IP tasks through a LAN? Are you able to generate visual data with R? What are some alternatives to database replication? Splunk? What is your experience with high-traffic, forward facing dynamic pages that are based on transactional frameworks?   How about consumer-based technology, e-Commerce? Re-clustering of a Virtual HPC stack? What about SDKs? Are you an expert with Java? What about Mobile technology? Know how to write in responsive design? Experience with Machine Learning? How about Cocoa? Digital image optimization and the Adobe Suite? Have you performed a RAID recently? Drupal? Wordpress? Dealing with clients? Our company is very stressful, how can I be sure you are able to deal with this? Writing authentication modules with LDAP? Federations? Editing CPP files? Can you provide database snapshots? AWS, Virtual Machines, Akamai, NodeJS, Load balancer performance tuning... Shall I keep going? Docker, Chef, Puppet, stacktrace, udap... Salt...

Let's say you can do all of this. Great. And... you have experience with all of it. Still you're left with a potential response of, "But what about..." And you're expected to not laugh. I actually created a meme recently but removed it from the Internet for fear it was too risqué. It was a photo of Albert Einstein with the caption, "We regret to inform you we have selected another, more qualified candidate. We were looking for someone with more experience with Amazon Web Services." Oh! The irony...


No one can know everything. It's a virtue to admit you know nothing at all. And yet, in the tech world you are expected to have experience with and know everything about everything. It's simply unrealistic.

How are you to gain experience with everything if your past positions were limited in any way? Surely you're looking for a new opportunity for some sort of progressively-tinged reason?

Gone are the days a man can put on his best suit, get a shoe shine and walk into a proper office building with a resume and receive a job offer the next day. We're in the age of information overload and it's going out of control at an alarming rate.  Notice how fast the Internet is now? The speed has increased in the past year alone. Wait, there's something faster than dial-up? ...Just kidding. Still, how about those sorting algorithms? Are they working for you to find any small thing you might want on the Internet? And the sheer amount of content? It's mind boggling and unnatural. Nothing seems special anymore, but I believe this assertion is incorrect. There are still special things out there, but you must work to uncover them, in your psyche and in your natural life. Peace and serenity come from within.

I'm not sure if I will be able to land another job in technology and it seems as though I may not be able to, but I won't lose any sleep over it. I've been there and seen it, at a high level and from various angles and contextual involvements. Too many hands in the kitchen and nothing gets done. Incomplete instructions yield poor results. Often times in tech you'll hear something along the lines of, "We want to use this new software but we're not really sure what it is or how it's going to work or anything about it all really, but I want you to figure everything out about it and present a report, so we can potentially implement it." I'd like to include a metaphor that likens ordering a sandwich at a deli with software management, but I'll skip it and summarize my thoughts.

Automation is taking over. The necessity of a back-end web developer may no longer exist in the space of a few years. At least their vitality will have depleted. The Internet may reach a state of diminishing returns wherein all content is so heavily automated we won't need people to rearrange any back-end stuff on any web application anymore. We will be forced to ask ourselves, "What do I really want to consume via the Internet?" and will have to act accordingly, or be subject to the "mind control" tactics of large corporations to color our digital existence.

The answer to a 'True or False' question is not subjective, so long as it's already written into memory. Where probability is concerned it's not much for Math.

Sunday, July 9, 2017

Blending videos with bash (imagemagick, ffmpeg)

Years ago I was trying to figure out "batch processing." This refers to the concept of applying a single transformation to an entire set of files with one command. Specifically, I wanted to combine two videos, matching frame-by-frame, and blend the two videos together.

The software you'll need to complete this is ffmpeg and imagemagick. Both are CLI softwares you can install via Cygwin, or MacPorts. This is much easier to do via MacPorts, but if you're on Windows, it's not impossible. I was able to install both on an offline Windows 10 box.

To demonstrate what will happen, I'm going to show a single frame as an example:


 This is a blended image, the result of two images composed with an imagemagick CLI command into a final result. To achieve this you run:

$ magick composite -gravity center -blend 30x70% strawberry.png banana.png combo.png

Now, the concept for video, is to blend two videos together, matching frame-by-frame, so that if two 60 fps videos are both 2 seconds in length, you'll blend 120 frames from each into 120 final, blended frames. The concept of completing this task with a single command is what's referred to as "batch processing."

For the code snippets, let's consider "Clouds" and "Flowers" instead of Strawberry and banana, for now...

1. First gather some info about our video, we run:


ffmpeg -i Clouds.MOV

 Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    creation_time   : 2019-07-02T21:32:31.000000Z
    com.apple.quicktime.make: Apple
    com.apple.quicktime.model: iPod touch
    com.apple.quicktime.software: 12.0
    com.apple.quicktime.creationdate: 2019-07-02T17:32:31-0400
  Duration: 00:00:05.67, start: 0.000000, bitrate: 15449 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 15369 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
   
So we have 29.98 fps, let's round up to 30 fps
   
To get the frames we run:
    ffmpeg -i Flowers.MOV -vf fps=30 Flowers_frames/Flowers%03d.jpg -hide_banner

    ...and the same for the Clouds
   
Then to compose them into the final frames we just run this:
   
    $ for i in $(seq -f "%03g" 1 170); do magick composite -blend 50x50% "Clouds_frames/Clouds"${i}".jpg" "Flowers_frames/Flowers"${i}".jpg" "Combo_frames/Combos"${i}".jpg"; done
   
Now that we have the final composed frames, we reanimate these frames into a video with this command:
   
    $ ffmpeg -r 30 -f image2 -s 1920x1080 -i Combo_frames/Combos"%03d".jpg -vcodec libx264 -crf 25 -pix_fmt yuv420p Combo.mov

Note that %05d refers to the length of the largest digit as 5, i.e. 11568 and so all numbers will be padded with the appropriate amount of zeroes to match this length (i.e. 20 becomes 00020), and all filenames will be of the same length. This is so ffmpeg doesn't confuse frame ordering during rendering.

Lastly, you can take the original video's audio and the composed and rendered video and combine those... offsetting the video by .10 seconds (for a better sync)...
ffmpeg -itsoffset 0.1 -i video.mp4 -i original.mp4 -c copy -map 0:v:0 -map 1:a:0 final.mp4

Where video.mp4 is the rendered psychedelic version and original is the original (with audio). The offset component " -isoffset" is applied to the "-i .mp4" that comes directly after it.

That concludes this tutorial. If you have any questions, I'd be glad to answer them. Good luck!

And that's it. I'll post a demonstration once I film the videos properly.

How I wrote/recorded my album "Disposable" (2025)

Click to listen on YouTube, out now!! This blog post will attempt to fully encapsulate as much of the writing/recording/mixing process of th...