getting my cubox-i4-pro up and running

So I got my Cubox-i4-Pro. The hardware was a piece of cake. Getting a useful distribution was another matter. I installed, or tried to install, Ubuntu, Debian, Raspbian, Arch and Android. I wish Linux Mint was available for the ARM processor. Mint just has most of what I need out of the box. The Ubuntu installer is way old, version 11.10. I immediately tried updating the system which killed it. The Debian installer was mapped to the British keyboard, did not have the resolv.conf file properly set up and did not have anything in the /etc/network/interfaces file, and it came with XFCE (which looks like Windows 95, or at least, Windows 2000). Arch had way too many problems (i.e. – documentation). While it was easy enough to get Android installed, I would have had to have gone through hoops to make it a useful OS. So I went back to the Ubuntu installer, denied requests to update for a few minutes, after all the requests to update were under control I was able to turn off updates, then uninstalled the update manager, removed the Ubuntu Software Center (the Lubuntu Software Center doesn’t seem to work), reverted to classic Gnome, turned off overlay scrollbars, but despite that, it is working and running smoothly. Code::Blocks and Geany work without problem. I’ve installed lamp-server via tasksel. It looks like Qt isn’t available for ARM yet, not sure about Eclipse. Overall the hardware is beautiful and takes up so little space. Just waiting for the distros to catch up.

PHP sniffer

Dealing with a number of Joomla! websites which are constantly being hacked. Lousy support, lousy community. I wish they would make the lives of web developers easier and just make an End Of Life announcement already so we can go to our bosses and get away from that crap content management system. But in the meantime, you can use this script on your website to log any *.php files which mysteriously appear on your webserver. Just create a MySQL database table and run the script. If you want, you can replace the echo $output; with some code to send you an email of suspicious files. The script will alert you until you either a) delete the new *.php files, b) add the full path to those files to the datbase of “good files”, or c) truncate the database table, run the script again, which is basically the same thing as option b. Here is the link: PHP sniffer

new android app – quick source view

yeah, it’s pretty lame, but it gets the job done… basically, i needed something i could use on my droid to see if certain bits of markup were being generated for my mobile sites. also, i didn’t want to have to download a lot of images all the time. so i came up with this 41kb app to display the markup. google play.

visual basic-like creation tool for android

don’t know why someone would use this over Eclipse/Java… sure Eclipse can be awkward at times, but VB, really? well, someone might have use for this.

new IE tax

love it. this fellow is charging people for using an antiquated browser.

linkedin hacked

LinkedIn Hacked

LinkedIn Hacked

Just after getting sick of all the “branched out” requests on facebook I see this. The good news is they were just passwords and not username+password combinations, but still. What big sites could also do to improve security is have a number of encryption algorithms and flag users as “type1″, “type2″, etc., so that one intrusion does not compromise all.


tirade contra .net

Just how old Microsoft technologies seem to hold on in the business world long after the public abandons them abandons me. Still there is, to some degree at least, a belief that Microsoft is somehow a better solution for businesses. In fact, the idea was once so thoroughly ingrained that any statement to the contrary was heretical. Yes, one of Microsoft’s original objectives with .NET was to target internal business applications. But that doesn’t mean that Microsoft ever succeeded in that objective. While Microsoft succeeded in building a framework, in their weird way, the result was some very complicated solutions to some very simple problems. Though I don’t know for sure, this is usually the result of a project trying to be all things to all people.

A history of .NET would be too much for a blog post, suffice it to say that .NET was invented in the 90s to address problems faced by web developers in the 90s. However, by the time Microsoft was done building all of the tools necessary to make .ΝΕΤ a reality, many of those problems no longer existed. For instance, the difference in JavaScript implementations between Internet Explorer and Netscape. By the time Microsoft was done with .NET Netscape no longer existed, and the Internet Explorer team, working independently of the .NET team, rewrote Internet Explorer’s JavaScript engine so that it would be more in line with ECMA standards used by Mozilla and WebKit-based browsers.

Regarding its invention in the 90s, this is probably the reason why no matter what you do the quality of a .NET project always seems to be frozen in the 90s. While the rest of the internet is moving along, advancing, simpler, cooler, faster, .NET seems to exist within a stateful bubble in which the modern rules, standards and goals just don’t apply. One does not have to know the inner workings of .NET to know that there is just something wrong with it. Typically, when you go to a .NET site you can see with the human eye that it takes considerably longer to load than your typical (PHP) website. Your cursor just keeps spinning. The “white page of boredom” lasts much, much, much longer.

Since it’s inception companies using .NET have complained that the TCO (total cost of ownership, in “business speak”) is far more than they were expecting. This should be no surprise coming from a framework which must reside on an operating system known to “get tired” and to have “missing dll files.” Speaking as a developer .NET must be one of the most confusing, most poorly thought out, systems for building applications. The learning curve for .NET is mountainous while that of say, PHP, is more like a speed bump. It is not that PHP is somehow “for dummies” or less of a development tool than .NET. On the contrary, a solitary PHP developer can typically build applications far more complex in a fraction of the time that it takes a whole team of .NET developers. The facts are that .NET is just too complicated, requires compiling, depends upon all of the failings of the Windows operating system, and at it’s core, the framework is about “wiring up components to data sources” and not about really understanding what is going on “under the hood.”

For ten years now, ever since its first official release in January of 2002, I have been watching the .NET community, lurking on programmer forums, just reading the posts, and from time to time trying to wrap my head around it. Someone will ask a question which invariably results in numerous .NET developers responding with “try this…” and “try that…” Try? There’s no definite answer? As I wrote, .NET is about “wiring up” and not about building. Which is fine if your goal is to slap something together and cash the check. But if part of your business model includes the objective of being able to make changes to a system perhaps years after Phase 1 then your people really do need to know how it works. Simply “wiring it up” will not suffice. What I’m saying is .NET leads to sloppiness. If clients only had a little understanding of web code and were to take a look at the code files and see how .NET projects are routinely slapped together they would be appalled.

Two thousand years ago the orator Cicero wrote that every time emissaries from the Greek-speaking east would address the Roman senate that there was always one senator who would ask for an interpreter due to a poor command of the Greek language. So too when it becomes apparent that Microsoft is no longer a viable technology company will there be one American senator, who failing to understand how much the technological landscape has changed, will claim that Microsoft is “too big to fail.” This may prolong the inevitable but it will not provide a solution to the dilemma which we are currently facing, i.e. – how American companies are going to disengage themselves from their reliance upon Microsoft technologies such as .NET. Ultimately, they will have to, because it has been fairly obvious for some time now that .NET, and Microsoft as a whole, are not getting worse, but they’re not getting better either. In a way, I’m hoping that Microsoft will hang on just a little longer. Long enough for those American businesses still dealing with “I don’t know why we’re down” and cryptic error messages and needlessly convoluted ways of doing things to realize that Ubuntu can be installed in minutes, or that Macs come with all the software needed for the hardware, or that you can just as easily build a pie chart or spreadsheet on a Chromebook.

mobile/desktop switch for wordpress

WPtap automatically detects the type of mobile device you’re using and loads the admin’s chosen WordPress theme. This made my job a lot easier! It also has the option of directing the user to a separate URL.

jquery.controls (beta)

jquery.controls (beta) was written to help expedite the tedious task of validating forms client side. With jquery.controls:

  • You do not have to tell it which form/s to validate. The plugin will figure it out.
  • You can work with either CLASS or ID attributes.
  • You can validate emails.
  • You can validate numeric input (or non-numeric).
  • You can make certain the user does not enter some pre-determined value.
  • You can make certain the values of two fields match.
  • You can pass in any valid JavaScript regular expression. (Useful for validating dates, credit card numbers, etc.)
  • You can apply a maxlength to textareas and specify a “# remaining” status box.
  • You can validate a group of radio buttons by CLASS or ID attribute.
  • You can make certain the user selects at least one checkbox from any number of checkboxes within a container element.
  • You can supply your own error messages or use the defaults.
  • You can style the error messages however you like, or hook it into another plugin, for instance a tooltip or alertbox plugin.

All you have to do is place the rules of validation within hidden tags. These rules have been kept simple so you can usually just copy and paste from the demos. The code has been thoroughly commented so that suggested improvements can be made.


parse querystring with javascript

at some point in time i had to parse a querystring with js. so i named it after PHP’s parse_url() of course, split it at the &, and returned an array.

here’s how you would call it assuming you had a querystring variable named “id”: