Now on a new server and a new service!

So! My old server crapped out on me on the 3rd, I was about to fix it when I figured, I might as well find a new service and a new server to port everything to. I don’t know about you, but when I plan something, I built the grand vision, and then, I trim down to my MVP.

I’ve successfully ported the files over, while hoping I’ve forgotten nothing, but still feeling like perhaps I’ve lost a thing or two. Here were my considerations.

I’ve mulled ported my site over the AWS, but since I require about 50 GBs of storage, the storage of the files in S3 alone would’ve been about 10 bucks. Then I’d have to spin up an EC2 instance, then maybe I’d consider a EBS and then mount it into my EC2. Or consider a dockerized solution… Then I was thinking I sometimes have a tendency to adopt a solution that’s just way overkill for what I need.

Yes, you can argue for the glacier, slow / cold storages, and how they’re pretty cheap, but storing things into it, and getting things out, isn’t as simple as an rsync, and to rummage my life time of random code and assets, it just didn’t feel like the proper persistence solution.

Then I thought about Digital Ocean, frankly, their platform isn’t bad. They do have a service that allows you to spin things up with Docker images, but, with Docker comes some Docker pains, not quite the solution I need for my personal sandbox. Plus, it was going to be like 10 bucks a month, I’m not made out of money here! Just kidding, but I don’t know about you, I’m a bit of an optimizer, maybe it’s my programmer DNA, maybe it’s all those hours grinding those algo training sites, maybe it’s… (you know the slogan).

At the end of the day, my move to the current host was a cost based decision. AWS pricing models require an estimator to figure out why you had to pay as much money as you did. Frankly, at the moment, give the complexity, traffic, and purpose this portal receives, it just doesn’t make much sense.

SO! After some searching, I’ve landed on IONOS, frankly, I’m paying just as much as I did with BudgetVM, arguably cheaper, since I get a 3 dollar discount the first month. It provides me with about 80 GBs of space, and sufficient memory and processing power for what this portal needs. My site is 99.99% static, and sitting behind a cloudflare full page cache. My 5 dollar a month box is more than enough even if I got a billion hits a day (thanks Cloudflare).

The VPS is crazy barebones, and frankly, there are a lot of insecure things about their barebone step. They put it on you to lock the box down, and I am okay with that! Frankly, there are a ton of stuff that needs work behind the scenes and will take me a good amount of time bring this box up to speed, but, these broken things are for me to know, and others to never discover 😉

Anyways, this is home for now, I think this company is worth checking out. Here’s a referral link, I might get like 5 cents of this, but it’s still 5 cents, right? Micro optimizations!

https://www.ionos.com/web-hosting?ac=OM.US.USf11K357085T7073a&kwk=705760499

Budget VM Notice

So today, my hosting company notified me, that they’ll be terminating my service plan come the start of December. Forcing me to migrate everything to a new platform. 5 bucks a month is a hard price to beat now and days. I’m going to have to do some serious thinking on just what I’d like my new ecosystem to be like. I can shop for something that is more of the same, or I can re-architect everything into a brand new paradigm while aiming to pay even less than 5 bucks a month.

Decisions… Decisions. The software engineer inside me screams… “Ugh… Tech debt…”

My first React Native App

Why did I write a React Native app? I’ve always been language agnostic, there’s no single language that rules them all. Each language has its feel, syntax, purpose, and style. There are languages that prefer a functional programming style, others that prefer objects. There are stateless and stateful paradigms. While the time involve was brief, there are still a lot of significant hurdles I had to overcome in order to write this app.

The first hurdle, myself. I prefer to build applications that serve a purpose, and the more purposeful the app, the more enthusiastic I am about coding it. I do see my foray into React Native as an investment towards building something more complicated in the future. You can’t even imagine how many things I’ve built that I don’t feel comfortable sharing, things I feel comfortable sharing is but a small subset.

Without further ado, here’s a preview of my Reactive Native App that I compiled for Android.

I have a weird sense of humor. “Meet Jackson’s Random App”. I do enjoy those Mensa puzzles.

Why a coin flipper? Sometimes, you’re 50/50 on something, and you just need a coin flip, with everything so digital now and days, you’ll be surprised how often I find myself without cash and coins. Thus, a digital coin. Then you might ask, why a random number generator? Again, a random number between 1-100 might just be the most unbiased way to decide who gets the say in a group orientated activity.

My first version was just a coin flip and the result. It was to the point, but then I realized, after pressing the button, I don’t know whether or not it’s my second HEAD result or if my app did nothing, so, I added a delay and a “flipping” screen. Yes, it hurts, but I, purposely made my code SLOWER.

I also did the same for my random number generator.

I’ve spent about a day on it, a good chunk of it was simply ramping up my dev environment. I had to configure a windows machine, as my development environment, and I had to ensure that all the piping between my OS and the phone was kosher.

Below is a link to the source code, pretty boilerplate stuff for the most part, and if you trust me enough, the compiled APK is also in the repo, if not, you can compile the Reactive Native code yourself and go from there:

https://github.com/jackfucius/randomReactNativeApp

CSS inliners

At the moment, I’m working with a company where I’m handling their email templates. One tool I found to be very useful are CSS inliners. I won’t be discussing Inky templates in this post.

I’ve been using https://www.campaignmonitor.com/resources/tools/css-inliner/ and for the most part, it works perfect. The only down side is that I have to visit the url, paste into the text area, click a button, wait for the page to reload, copy, and the paste the inlined html. It was okay at first, but by the 100th paste, it gets stale quick. That’s when I started looking into CLI options.

The tech explosion has been great, providing a lot of inlining CLI tools I wouldn’t have had otherwise. Everyone wants to make a name for themselves on the interwebs, and I can relate.

That being said, I’ve went through pretty much all the NodeJS one, and the only one I found comparable to campaign monitor’s is “inline-email” located here: https://github.com/freethinkingit/inline-email

Example command:

inline-email index.html –noInlineImages | pbcopy

The other solution I found acceptable is the python based premailer. It’s pretty much just like inline-email, except it gives you the option to not strip the style tags. I did find that useful in some occasions in which the element you wanted to affect didn’t exists until rendering (sometimes clients inject things on their own). Premailer can be found here: https://pypi.org/project/premailer/

Example command:

python -m premailer -f index.html | pbcopy

If anyone is having issues getting their emails to look correct across email clients either phone, web, software based, you should give the aforementioned tools a try, definitely made my life a lot easier.

Skills, degrees, or product?

In the recent explosion of technology and all the varying degrees of “skills” that result from it. I feel a little overwhelmed. I am from a time where tech was essentially Apache, HTML, Javascript, CSS, and some sort of language that supports dynamic generation of HTML aka, DHTML. Then with every language there’s it’s evolving syntax, AND the various frameworks and their ever evolving practices.

Now? For javascript, you have your Grunt, Gulp, NodeJS, jQuery, VueHS, ExtJS, Angular, React, and the list goes on. For your CSS, you have your SASS / LESS, and browsers and varying versions of browsers to support. For your hosting, you have Kubernetes, AmazonMesos, DockerSwarm, Docker, VMs, Baremetal hostings, various hosting providers, and so and so on.

The following article really conveys the explosion of tech really well:


//hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f

In addition to everything, you have the Machine Learning field introducing it’s own thing or two as well, where hiring anyone with less than a Ph.D doesn’t seem too credible or meaningful.

I feel paralyzed by the sheer degree of stuff I “have” to learn. I see myself looking at wide lecture hall’s triple-column double-row chalkboard of tech thinking that these are the skills I have to know to be an effective programmer now and days, but is it?

I don’t think so. It seems that in the torrent of tech terms being thrown at me, and the various fear of being labeled as dinosaur, or a person who’s opposed to change, a fear of obsolescence, the fear of being all those “has beens” I’ve seen. Being caught up in this tech wave, I forgot something VERY important to me, which was WHY I do the things I do in the first place.

Did I sign up to learn and master EVERY tech out there? No. Did I sign up to be a programmer as a profession? No. What did I sign up for? To do what I love, and if I happen to be paid for it, great! Do I need EVERY tech out there to do it? No! No I don’t. Are some of the new tech out there applicable? Yes, I think so, but not all.

I think it’s important to be opened to the idea of new ways of doing things, so if there is a new tech / method that allows YOU to do things better and more efficient, you can. At the same time, realize that even if your methods aren’t the “latest and greatest” they are STILL capable of doing things. My focus is shifting away from the latest and greatest, and back to my original way of doing things, which is to use the proper tool for the proper task, and adopt tech only as necessary, and just have fun. Adopt tools that help with my goal of creating that cool thing I wanted to create, but stay away from that next shiny thing that everyone is raging about. Make it work first, optimize it later.

Do I need to use a machine learning model to write a web portal automatically? Probably not. Do I need to add webpack to my static HTML one pager? Probably not.

A long time ago, I talked about various methods introducing their own overhead, and how I coded faster as a new programmer than a senior programmer thanks to adherence to all the “latest and greatest”. I’ve forgotten about that, and I think, it’s time for me to get back to that, at least for my hobby projects.

Perfection Paralysis

I’ve spent more than a decade in professional software development. I’ve seen and fought this demon time and time again. The demon’s name is Perfection Paralysis.

It’s quite the beast. When you have so many eyes reviewing and critiquing your code, you want to be the best you can possibly be. You want your code to be representative of all that you’re capable of, because that’s what you’re judged by.

I think this is why I find writing my own hobby code so relaxing. No code reviews, no tech designs, no architecture reviews, and planning meetings and etc. I simply let the thoughts flow from my mind to my fingers; code happens, the world is changed.

I warn of the dangers of perfection paralysis because there is no single solution to solving a problem, there’s in fact, probably an infinite ways to solve it. No matter which way you go, there is always room for criticism and improvement. You can make it faster, you can make it neater, you can make it more extensible, you can make it more testable, and the list goes on.

I think one factor that a lot of developers don’t take into account, is how much more work they’re subjecting themselves and possibly their organization to.

Your code looks great, but did you do Doc Block commenting? Your code works, but is it type strict? Your tests passes, but does it handle mutation testing well? You have test coverage, but is it 100% test coverage, or partial coverage? Your test passes 100%, but does it pass for all device, or just a single device? Your application works now, but will it work once the load increases by a hundred folds? So on… and so on…

I find myself in this situation ALL the time, both in the professional environment and the non-professional environment. Great, this JS code works, but should I have done it in React? Great, it works in React, but should I have incorporated Flux/Redux? I finished it in native PHP, but should I have used the Laravel Framework? I did it in Laravel, but maybe I should have done this in GoLang? Great, I’ve coded it in GoLang, but maybe I should have coded it with Gorilla? The data persistent layer is in MySQL, but maybe I should have used DynamoDB? The list goes on and on and on, it will NEVER stop, because there’s simply no stop case, this is simply the nature of our work, there will never be a best, because the best is yet to come.

I think remembering the BIG picture helps me maintain my sanity. Reminding myself of the objective allows me to focus on running past the finish line instead of being crippled by anxiety at the starting line. In the end, code is code. It’s simply a series of instructions to a computer, a persistent mechanism, and presentation mechanism. No matter how we’ve changed things, those things stay the same. In the end, no matter how you code it, if it fulfills the objective, it’s working code.

I think a concept that a lot of developers forget in the software development life cycle, is that code becomes obsolete. In this RAPIDLY changing world, should be optimize for 10 years? 5 years? 3? 2? 1? 6 months? That’s a tough question, but let me answer it with another one. If you wrote optimal code using ES 5, is it still optimal under ES 6? If it was optimal ES 6 code, is it still optimal ES 7 code? If you coded it using React, could material UI have done a better job? If you used jQuery, and now you have all these built-in selectors to javascript, is it still the optimal approach?

I urge myself, and other developers to optimize for the situation as it stands, in their own life, in their environment, and future proof it to a reasonable extent. Architect it for the current and PLANNED next steps, but I wouldn’t optimize it any further than that.

Advance the code and project in an interactive, self-rewarding manner, rather than a giant hunk perfection that is either ALL or NOTHING, a long ways into the future from now. When you have 1 or 0, the expected value is 0.5, but if you allow yourself to build everything in an incremental manner, it’ll be much less stressful, and you’ll have more fun.

So for myself, or anyone else reading this… “It’s okay, it’ll be fine, even if there might be a better way, just do it the best way for the current circumstances, when the circumstances change, much like the Monty Hall paradox, we can pivot then”.

CBOE and bitcoins

Well, at the time when I wrote the CBOE article, soon after the CME announced they’d open their exchange BEFORE the CBOE. The most interesting of things happened as a result. I bought bitcoins at 11k, it moved to 12k, 13k, 15k, 17k, 20k, in a matter of days, followed by a fall to 15k, rise to 17k, dip to 14k, and so on… Anyone who followed bitcoin price movement prior to the CME opening would’ve seen this. They would’ve also witnessed the hyper volatility that happened a bit prior to the CME opening, and a bit after.

While I profited from my original theory of the impacts of the first cryptocurrency exchange opening, the effects of the exchange is arguably short-lived. While it’s true that at the beginning, it’s easier to gain from a buy and hold position than a hold and sell, in the long-run things can change dramatically.

The reason being is that now, it’s possible to SHORT bitcoin, and that creates incentive for current holders of bitcoins to sell. Due to the lack of regulation of bitcoin, it’s even possible for a major holder of bitcoin to enter into a short position, and then LIQUIDATE their inventory, causing a dramatic drop in bitcoin prices, then closing their short, and then buying their bitcoins back, milking the good-will that’s in the market.

I think the hype behind cryptocurrency has largely died down, and everyone has gotten their taste of it. In order for the price of the cryptocurrency to rise, outside money must flood in, I just don’t see a strong compelling reason for that at the moment, except in the case of Japan, where they’re experiencing negative interest rates.

CBOE will drive the prices of Bitcoins up as opposed to down here’s why

Bitcoin CBOE exchange plus or minus for bitcoin? I say plus; Just because you’re betting on the future price of the bitcoin move.
 
Lets examine a short. You’re betting the price will go down, this means that some large quantity of bitcoins have to be liquidated and slide down for less and less, in some sort of panic sale. Unless you hold a ton of bitcoins, you can’t really trigger this. If you DO hold a ton of bitcoins, do you really want your bitcoins be to be devalued for a gain in the market? Right now, they’re “millionaires”, but they can be “BILLIONAIRES”.
 
Much like my mistake for not selling at 20k/btc, I was blinded by possibly being a millionaire. I think we all have that blindfold, blinded by potential profits.
 
Now lets examine a futures long position. You’re betting the price will go up. How do you influence that? You buy up the bitcoins on the bitcoin exchanges. If you have a ton of cash, and you have enough capital in the exchanges primed and ready to go, you can drive it up just buy buying it up from the existing holders. I plan to sell all my coins at 107k, so if I do, the price of bitcoin goes up to 107k, the future long will be fulfilled the minute my price goes up, and you can sell it for a profit.
 
I do think, the exchanges will ultimately drive the bitcoin prices up because it’s easier to long than to short bitcoins at the moment. Good luck convincing the existing die-hards who held it at 1,000, 10,000, 20,000 that the bitcoin price won’t keep climbing up and they should sell…
 
This is my stance on it, it doesn’t mean I’m right or not open to debate on this, but the rules seem pretty rigged for bulls. Yes… The existing holders might convert bitcoin into cash, but probably to extract some mansion buying money, but not liquidate the entire net worth, that’s suicide.

Everything competes with everything…

I think it’s easy to think narrowly. It’s easy to think that if you’re in the restaurant business, you’re not competing against the car business. But, if you think about the fact that people have finite disposable income, then money spent on food, is money not spent on cars.

I think, with the advent of the internet the world has gotten smaller, and the advent of high-speed internet, the world has gotten EVEN smaller.

Now, in addition to competing for our disposable income, they’re also competing for our attention. People are no longer constrained to watch media on the air frequencies they can receive. No, not even bound to the programming their cable providers can provide. People now have unfettered access to media from the ENTIRE world. As great as this is towards furthering mankind’s understanding of one another, and appreciation of other people’s cultures. This introduces some very interesting problems.

Content producers, while partly, want to share their media with the world, also are businesses, and businesses exist to make profit, otherwise, they’d be called a charity. This is problematic because before, they only had to worry about competition from other air frequencies, possibly other cable channels… but now, they have to face the ENTIRE world.

I think, this is great for society as a whole, but I can see how this is bad for businesses, losing their grip on that geological monopoly.

The world is getting smaller, and sure, the landscape is getting tougher, but at the same time, before, you were the king of a small hill called your country, now, you can be the king of the world. If properly managed, your domain will reign much further than before, and perhaps, you can even profit greater than before; IF managed properly.

Enable Infinite Homepage Scrolling on Note 4 (rooted Android 6.0)

So! My loyalty to the Note 4 at this point is borderline fanatical. Samsung has YET to make a better phone, in fact, neither has Apple. I’ve recently bought a Verizon Note 4 to replace my T-mobile Note 4, since Verizon allows me to use both T-mobile and Verizon, but the T-mobile version wouldn’t work on the Verizon network. If I’m going to replace that phone that’s been acting up, I might as well replace it with a better one.

After a ton of pain, I’ve managed to figure out exactly which ROM, I should install, what’s working in what version of the ROM and so on… Eventually, I just went with a nearly stock ROM that’s simply rooted.

Everything looked normal an kosher, until I’ve noticed that the homepage doesn’t do infinite scrolls. I’ve found a lot of instructions online, but it no longer really covers the file structure of Android 6.0.

I’ve decided to write a post, and if it happens to help someone out there, then awesome.

-Open up your file manager, in this case it’s Root Explorer
-Go to /system/csc/others.xml (hold down on others.xml and open in text editor)
-Scroll down to the end (on my phone, the line we are looking for was the third or fourth from the bottom)
-Find the line that looks like this:

<Cscfeature_Launcher_DisabledPageRotation>true</

-Change “true” to “false” (without quotes). It should now read:

<Cscfeature_Launcher_DisabledPageRotation>false</


Citing my sources, but saved it for last, since I didn’t want to force my readers to read through things they didn’t want to:

The solution is actually an interpreted combination of:

Enable CSC Features on Samsung Devices (Root)

and

https://forum.xda-developers.com/showthread.php?t=2311335