Software/Device Development and Design

Mobile "Me Too" Fashion

Let me tell you a little story.

Microsoft once had a visual style, Aero, that was widely hailed as "good looking". Then Microsoft switched to Metro which was atrociously hideous in both touch-based and "traditional" desktop modes, and a fairly major flop for the company.

Then Apple came along, decided "I must imitate Microsoft's horrible new visual style!" And iOS 7 was born.

Then Google said, "Yes, me too! I have to imitate Microsoft's horrible looking new visual style as well, lest I be the only one left behind in old-fashioned 'good-looking land'". Thus arose Android L.

Now they all look horrid because Silicon Valley can't pull their trendster, hipster, Portlanian heads out the ass of "me too" fashion industry mentality.

Read more


Google Pulls a Microsoft, Pisses All Over Standards

This one page alone (discovered while searching for why my POP access to Gmail[1] is borderline broken) is sufficient proof that the dumbfucks working at Google have their heads completely up their retard asses, and are hard at work mimicking Microsoft's widely-ridiculed practice of pissing all over standards just for the fuck of pissing all over standards:

https://support.google.com/mail/answer/47948?hl=en

So Google expects people to use a non-standard convention in order to make what I'll call "Google POP3" behave like NORMAL FUCK STANDARD POP3?! Except even that still isn't normal POP3 behavior (unconditionally ignores anything beyond 30 days old whether it's been downloaded or not, and retrieves outgoing messages as if they had been incoming).

And yet, the motherfuckers over at Google have the nerve to pretend to be better than Microsoft? Fuck the whole lot of them. For fuck's sake, it's no secret that many of them came from Microsoft in the first place, so it shouldn't surprise anyone that they are the new Microsoft.

[1] "Uhh, if you hate Gmail so much, why do you use it?" Normally I don't, I run my own mail server. But anytime you do that, you still need an administrative contact address that's separate from your own server and domain. Otherwise, if you hit any registrar or hosting snags (and don't think you won't), then your "official" contact address goes right down with the ship, and now you're really in trouble. "Why not Hotmail or Yahoo Mail?" Uhh, would you use Hotmail or Yahoo without anyone pressing a gun to your head?

Read more


Unity3D Supports All .NET/CLR/Mono Languages

I've noticed there's a very common belief in the community that Unity3D can be used with exactly three languages: C#, JavaScript and Boo. (Well, plus C++ if you count Unity's "native plugins" - but there are various issues with that.)

That myth needs to be dispelled.

Yes, Unity only claims to support those specific languages, but the fact is, Unity knows nearly jack about any of them. It knows how to invoke their compilers, but that's about it. What Unity does know however, is Mono. Mono is what Unity uses for scripting, not C#, not JavaScript, not Boo.

Mono, of course, is an alternate implementation of .NET's CLR and libraries. As such, Mono, and therefore Unity3D, will happily run software written in any CLR/.NET/Mono-based language. Such as F# or VB.NET or Nemerle. Personally, I use Nemerle for my Unity work.

So how do you do it? Two steps:

1. Compile your code to a .NET assembly using any compiler for any .NET/CLR/Mono language you dang well choose.

2. Put the resulting DLL into your Unity project's Assets folder.

Simple.

And thanks to the metadata embedded into .NET assemblies, even your public fields will still show up, fully editable as ever, in the Unity editor.

Just because the Create Asset menu only shows C#, JavaScript and Boo doesn't mean that's all you can use. My car stereo lacks a button for "Play Duran Duran" and yet their Rio disc works just fine. Amazing!

On a related note: People, just because Unity automatically launches MonoDevelop when you tell it to edit your code, doesn't mean you actually have to use MonoDevelop to edit your code. Don't like MonoDevelop? Fine. Use something else. Pretty simple solution, huh? (Don't know how? Then I suggest starting with this. You may think I'm joking, but you'd be surprised how many professional programmers don't know how to use a computer.) Personally, I use Programmer's Notepad 2 for code editing, but there are plenty of choices out there.

Read more


MTP, MSC and Google iOS

If you work at either Google or Microsoft and you have had any hand in MTP or the demise of Android's MSC, then you deserve to die. Fuck you and go to hell.

And to all those employed by Google and Microsoft: Quit trying to be Apple, you worthless goddamn subhuman shits.

Read more


Mozilla Doesn't Know What They're Doing

I could go on forever with examples, but I'm going to limit myself to just one for now: How freaking hard is it to unfuck "Save Image As"? Mozilla's been screwing that up in various ways for about five years. Here's a fun instance of Mozilla's complete uselessness.

And of course, in my case the broken "Save Image As" is yet another new previously undiscovered incarnation:

On FF22:

Error: NS_ERROR_INVALID_POINTER: Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIIOService.newFileURI] Source File: chrome://global/content/contentAreaUtils.js Line: 771

Read more


Do Not Use git status --ignored

Sometimes it's useful to find all files in a git working copy that aren't being tracked in the repository. There's an --ignored switch for git status that's supposed to make it show the ignored files. Combined with --untracked-files, that should do the trick nicely. But the problem: The --ignored switch doesn't fucking work. Seriously.

To be more accurate, it only shows some of the ignored files (despite no mention of this fact in the man page). It's easy fooled: Just try adding someUntrackedDirWithUntrackedFiles/* to your .gitignore, and see if you can get git status to mention either the directory or the files inside it. Note that none of the settings for --untracked-files= fix this.

Wanna know the best part? There is no git command known to reliably do what --ignored claims to do. There are various alleged solutions floating around, but unfortunately they don't work. The author in that last link offers a suggestion, but still admits to a lack of confidence in it. Great.

My suggestion is what I recommend for git usage in general: Minimize your reliance on any features beyond the basics. For such an amazingly useful tool (I highly recommend switching to git if you're still on subversion - or worse, CVS or VSS), it's amazing how shitty git gets the deeper you dive into it.

In this case, I suggest using git ls-files to generate a list of the files that are under version control, stick them into a hash set (for quick lookup), then iterate over all the files in your working copy, outputting only the files that aren't in the hash set.

Here's how to do it in D:

/++ Show all unversioned (both untracked and ignored) files and directories in the current git working copy. Much like "git status --ignored --untracked-files=all" except this actually works (although you must run it from the root of the working copy). Further explanation: https://semitwist.com/articles/article/view/do-not-use-git-status-ignored Tested on DMD v2.063.2 Licensed under the WTFPL - Do What the Fuck You Want to Public License: http://www.wtfpl.net/ +/ import std.algorithm; import std.array; import std.file; import std.path; import std.process; import std.stdio; import std.string; string run(string cmd) { auto result = executeShell(cmd); if(result.status != 0) throw new Exception("Command failed: " ~ cmd); return result.output; } void main() { if(!exists(".git")) throw new Exception("Must run from the root of the git working copy"); bool[string] versionedFiles; auto gitOutput = run("git ls-files"); foreach(filename; gitOutput.splitter("\n")) { versionedFiles[filename] = true; // Also include the file's parent directories, since git likes to // pretend there's no such thing as directories: while(true) { auto parentDir = dirName(filename); if(parentDir == filename) break; // Done versionedFiles[parentDir] = true; filename = parentDir; } } foreach(DirEntry entry; dirEntries(".", SpanMode.breadth)) { // The output of "git ls-files" doesn't include the "./" prefix // (like DirEntry does) and uses forward slashes on all platforms. auto filename = entry.name.replace("\\", "/").chompPrefix("./"); if(filename !in versionedFiles) { if(entry.isDir) writeln(filename, "/"); else writeln(filename); } } }

Read more