Android Studio 3.0.1

I recently upgraded my Android Studio to 3.0.1. The first few changes I noticed were all in the project structure, or in gradle, or in other ways that the AndroidManifest.xml is parsed. Suffice it to say, after the upgrade when I opened my project, I had to spend a little time on google fixing all the errors. Other than fixing the errors, I haven’t noticed any big changes so far. I’m sure they’re there, but not quite visible.

I thought this version would have a better emulator, but I haven’t seen it. Other than the x86 images for virtual devices, I only see arm images. Working on an AMD processor is still a bit of a hassle. All HAXM stuff is useless on an AMD processor. I suppose working on an AMD in general is useless since everything on an AMD has the feel of being a knockoff. I hear the Ryzen CPU line has changed all that. But then Ryzens don’t ship with GPUs, and still break down with some games. Some games vendors have worked with AMD to fix the games to work correctly on AMD, but AMD couldn’t just make a cpu that is compliant with the x86 instruction set. Oh well, this is not a rant about AMD.

Still trying to find a worthwile emulator for AMD. Sometimes, you just can’t plug in a phone or a test device. Genymotion being the only one that everyone uses even on AMD.

Going to keep on using AS3.0.1 and will see if it’s an improvement on the previous version of the software.

Bootstrap and jQuery

I’ve been working with bootstrap and jQuery a little lately. While, it’s impressive what you can do just out of the box, it’s a little bit like the early days of javascript. There’s bootstrap, bootstrap-theme, and bootstrap-combined. Bootstrap’s own website says nothing of the “combined” version. Nobody explains what the “theme” version is for. A quick review of the docs fails to clarify that point.

While working up a basic website, I needed to have a modal dialog for user input. After googling a bit, I found this site: http://mode87.com/untame/demo/modalcontact/. The author uses the following these files:

  • assets/bootstrap.min.css
  • http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js
  • assets/bootstrap.min.js

So the author is clearly working with a downloaded version of the files and those files have either been modified or contain code that isn’t in bootstrap files anymore. The animation works great, the dialog slides in and out of the window.

When I use the same code to run the example on my local server and use bootstrap files from the CDN, it doesn’t work for me. That reminded me of early days of javascript where some javascript code would work on 9 browsers out of 10 but would fail on the 10th one just for sake of it. That was using the same browser. The same code would work even more unpredictably on different browsers. Javascript engines have come quite a ways from those times, but some of these bootstrap/jQuery frameworks haven’t quite caught up. Or if they have, the authors don’t seem to be communicating/documenting stuff properly enough.

In the end, this is how I solved the modal form fading in and out stuff.

<!-- this is how to show the dialog -->
<span id="row-1" class="glyphicon glyphicon-arrow-down" 
  style="margin: 2px 10px 2px 10px;" 
  data-toggle="modal" data-target="#user-data"></span>

<!-- this is the modal dialog -->
<div id="user-data" class="modal fade">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header"><button class="close" type="button" data-dismiss="modal">×</button>
        <h4 class="modal-title">User Settings</h4>
      </div>

      <div class="modal-body">
        <div class="row">
          What you want here. Form Inputs, Data displays, etc.
        </div>
      </div>

      <div class="modal-footer"><button class="btn btn-default" type="button" data-dismiss="modal">Close</button></div>
    </div>
  </div>
</div>

You’ll need to add a <input type=”button”> tag and capture the onclick to respond to the OK hit and post back to the server or modify local UI elements.

One Editor To Rule Them All?

So I discovered Atom today from GitHub’s twitter announcement. I’d been using Eclipse for all my PHP file editing and it didn’t have syntax highlighting enabled by default. I didn’t feel like messing with the settings to find PHP specific settings and enable them. Or it might be that you have to actually download a plugin. Eclipse has served us well for Android developement, but now we have Android Studio for that. So I suppose Eclipse was just sitting there on my machine doing nothing when I decided to use it for PHP. It left me wanting.

Enter Atom! I downloaded Atom and right away liked the streamlined, fast, and efficient UI. It has enough basic themes installed to cover your basic dark/light theme’ing needs. PHP syntax highlighting out of the box? Sure! Interspersed PHP tags in HTML soup or vice versa? No problem, syntax highlighting fully enabled! And tabbing that works great. Pasting new text will paste it after properly indenting the text. You can open an entire folder as a “project” and all the PHP files in it will open in a treeview on the side. And after doing all that, it still loads in less time that eclipse takes to start showing you the splash screen.

So, while I might still occasionally use notepad for editing simple config files, I think for all my coding needs, I’ll move to Atom.

If you feel like it, give it a chance at: https://atom.io/

GitHub moved to ” British Indian Ocean Territory”?

So what’s with all the .io domains. Is it clever that you know i/o stands for input/output? Is it cool that you have a website somewhat related to technology so you register a .io domain. Has most of GitHub moved to the British Indian Ocean Territory to have .io this and .io that? Atom.io, github.io, etc. etc. Is a .com, .net or a .org just not good enough.

This has also led to a bit of a clutter of frameworks hitting the web all with .io. Is it just cool? Is it tacky? I don’t think it necessarily bothers me, but it made me notice it enough to warrant a blog post. I suppose I’m more curious as to why the .com, .net, .org, or .us aren’t enough. Especially since the entire purpose of country specific TLDs was to have URLs specific to that country. Now, instead of country specific websites, we just have “clever” websites where people think, “oh I like this song, ‘whip it’, so I’ll register whip.it, even tho .it is really supposed to be for Italy specific websites.” I know there’s nothing that mandates it as law, but still it is called country code top-level domain for a reason. Additionally, what’s categorization if we put salt in containers marked “sugar” and pepper in containers marked “salt”?

But when all that’s said, guess I’d still register something catchy. 🙂

JS Frameworks by the Dozens

Lately, there’s been a ton of JS frameworks/libraries coming out. AngularJS, React, Bootstrap, Meteor. There are templating frameworks such as Handlebar, Moustache. There are the simple libraries like jQuery, etc. etc. It’s getting a little ridiculous to think that any one of these framework wasn’t enough. All the extra work that goes into creating yet another framework can be put into extending one of the existing ones to include what it is missing. Yet it seems developers keep writing frameworks and then publish them. Immediately each new framework gets some followers who swear by it and a new community is born. This community will insult all others, claim to be superior, yet it fails to fill that void in other developers’ souls. And those developer in turn go out and write yet another framework.

This really has to stop. Each framework distances you from underlying core technologies and becomes a specialty that claims space on your resume. It also prevents other developers from being able to work on a given project if they’re not familiar with the framework in use. In some ways this is a created problem for which a framework has then been created. There is stuff like firebase, which is cool and at the same time not really needed. Somebody has created a javascript library and a bought a lot of backend servers and is using sockets/polls to deliver realtime events to your page. And you’re now paying 19.99/mo or whatever price they feel like charging. This should just be implemented in your own app without needing an outside app hosted on their server, etc. etc.

For a long time I was under the impression that I’m the only one who thinks this way. But now, I see there are others who feel this way, too.

http://bitworking.org/news/2014/05/zero_framework_manifesto