TechBlog
leaflet
#js1k entry finally complete - AsciiBrot1K:http://urlm.in/flii - from T-SQL to JavaScript and then down to just 1KB of hand-compressed code

Motorola Europe, I Challenge Thee

Posted on 12 February, 2011 by maximinus

I hereby issue a challenge to Motorola Europe:
Show that you love your customers this Valentine's Day by unlocking our bootloaders. Start with the Milestone A853, as we've been waiting the longest, and then work your way through all the phones you've abandoned already, followed by those which you still claim to support at present.

I believe that, given an unlocked bootloader, the community could do what you say you couldn't, and get at least 2.1 (probably 2.2 or 2.3) running nicely on the CLIQ XT MB501 - along with updates for the other phones you've abandoned.

If you can't/won't support the phones you make and sell, at least let the community try to support them for you - there's a willing and able community out there, but you prevent them from making your phones live up to their true potential by preventing them from providing the support/updates that you don't.

Note: This challenge has also been posted on the Motorola Europe Facebook discussion pages, and the Motorola Europe Facebook wall. I'm reposting it here in the hopes that the more public I can make it (i.e. not hidden within Facebook), the more attention it'll get and the more pressure it'll put on Motorola Europe. Please feel free to link to or repost this challenge elsewhere.

No comments have been posted on this entry. Click here to post a comment.

Windows file sharing stupidity

Posted on 9 January, 2011 by maximinus in Linux

A couple of months back, I did a nice fresh installation of Ubuntu 10.10 on my laptop - on a shiny new Seagate Momentus XT drive. All was well, and I could connect to my Windows machine's file shares just fine.

Fast forward to today. I hadn't tried connecting to the Windows file shares for a while, but wanted to grab something off my desktop machine. No matter what I tried, I couldn't get the laptop to connect to the Windows machine's file shares. I ended up attempting to manually invoke smbclient, with the debug flag set to maximum debug level, in the hopes that it would shed some light on the situation. The best that I got from that was these two lines:

SPNEGO login failed: Invalid parameter
session setup failed: SUCCESS - 0
which didn't really shed much light on it.

A bit of googling around found a few people who'd done the same thing to debug smbclient connection failures, but they mostly turned out to be trying to create null connections (no user/pass - not even the "guest" user), which Windows doesn't like. Then, I managed to find this post, which gives the actual solution to my problem.

The solution? Uninstall "Windows Live Essentials" from the Windows 7 machine. Seriously. I'd installed Windows Movie Maker - which, these days, is part of Windows Live Essentials - a month or two back, and that was apparently enough to completely prevent samba/smbclient from connecting to that machine. Upon uninstalling Windows Movie Maker, the shares started working again immediately!

No comments have been posted on this entry. Click here to post a comment.

Ubuntu 10.10 and laptop touchpads

Posted on 16 October, 2010 by maximinus in Ubuntu, Linux

After several iterations of not getting around to upgrading Ubuntu, and subsequently deciding that I may as well wait for the next version as it's nearly here now, I finally upgraded to Ubuntu 10.10 this week.

All was going well, until I tried to play Minecraft. I couldn't be bothered finding a mouse, so I was going to play using my laptop's touchpad. At first, it seemed to be working fine - but then everything was very jumpy, with my touchpad input seemingly freezing up and then jumping around. I figured it must be either lag or something wrong with the version of Java I was using, but then, on a whim, plugged a mouse in. The mouse worked fine.

I didn't think much of it at first, thinking that it's not a huge deal if it's just Minecraft - I can use a mouse for that. Then I noticed that it was happening everywhere - even on the desktop. I wondered if there was something wrong with the touchpad driver, causing it to lock up whenever there was keyboard input, but soon discovered the real culprit - a new setting, and its default value.

To fix the issue, all you need to do is untick the "Disable touchpad while typing" checkbox on the "Touchpad" tab of System -> Preferences -> Mouse.

One comment has been posted on this entry. Click here to view.

Android issue 8636 - "Can't establish a reliable data connection to the server"

Posted on 30 August, 2010 by maximinus

If you've found this post, chances are you're suffering from Android issue 8636 - you're trying to add a Google Account to your Android device, but you're receiving an error stating "Can't establish a reliable data connection to the server" every time you attempt to add it.

There are several suggested fixes or workarounds for this issue - but many don't work, and the main one involves performing a hard reset, which wipes your data... and doesn't always seem to help. This post aims to compile workarounds, since Google doesn't seem to want to acknowledge the issue and resolve the underlying problem.

The YouTube Workaround
This is the most recent workaround I've come across. It also seems to perhaps be the most reliable workaround, and has no negative side-effects. I have personally used this workaround successfully.

  1. Go to youtube.com and sign up for a new account, using the email address you want to add to your phone
  2. Open the YouTube app on your phone, sign out of your account if you're currently signed in (menu button -> sign out)
  3. Sign in - menu button -> my account, log in with your EMAIL ADDRESS (not your YouTube username)
  4. You're all done - you can sign out of the account in the YouTube app again if desired. Go to Settings -> Accounts and you should see your account in the list. Sync will be disabled (both Contacts and Mail) - open the account's settings and enable one or both if desired.

The Hosts File Fix
The first time I struck this issue, I first attempted the setings.db workaround, and, when that didn't help, I performed this one. This allowed me to add an account, but a couple of weeks later, I had the issue again and was unable to get this to work. Your mileage may vary. This fix requires your phone to be rooted. If you don't know what that means, don't try this fix. Perform the following on a local terminal, after using "su" to gain root privileges.

  1. Remount your /system partition read-write. This will vary slightly based on your particular phone, but for a Motorola Milestone, the command is as follows:
    mount -t yaffs2 -o remount,rw /dev/block/mtdblock6 /system
  2. On your computer, run "nslookup android.clients.google.com" in a terminal / command prompt to obtain an IP address for it.
  3. On your phone, open the /etc/hosts file for editing:
    vi /etc/hosts
  4. Press "a" to enter editing mode, and add a new entry (where x.x.x.x is an IP found using nslookup above, or you can try 74.125.93.113 if you can't get one that works): x.x.x.x android.clients.google.com
  5. Press escape (how to do this depends on your terminal - ConnectBot uses a double-click on the center button or trackball on phones with such buttons), then type ":wq" and hit enter to save the file
  6. Either restart or run the mount command again with -o remount,ro rather than -o remount,rw to make the /system partition read-only again
  7. You should now be able to add your account. If not, and you didn't restart before, try a restart to flush the DNS cache.

The settings.db fix
This fix also requires your phone to be rooted. It will also result in the restoration of some settings to default values - I found that I was discovering reverted settings for a few days after attempting this fix.

  1. Using a root file explorer or a shell that you've used "su" to gain root in, delete the file /data/data/com.android.providers.settings/databases/settings.db - or the whole /data/data/com.android.providers.settings directory if you prefer.
  2. You should now be able to add your account. If not, a restart may help.


Please note that this post is intended to chronicle my experience dealing with this issue. It may not be entirely accurate, and your mileage may vary. I take no responsibility for anything you do to your phone. If you wish to root your phone, please make sure you familiarise yourself with the consequences of doing so before you begin. I would suggest starting with the YouTube workaround, and, if that fails, trying the /etc/hosts fix and then the settings.db fix as a last resort, as the YouTube approach is safest, followed by /etc/hosts and then settings.db - and this also seems to be the order of most likely to work to least likely to work. The YouTube workaround also does not require root, so anybody can do this.

3 comments have been posted on this entry. Click here to view.

Smoothwall, cbq.init and bugs

Posted on 5 February, 2010 by maximinus in Linux
I've recently been attempting to get per-IP ratelimiting implemented on a Smoothwall Express 3.0 box, with very limited (if you'll excuse the pun) success. The stock SWE3 kernel is lacking many things which are needed for such ratelimiting, so I had to resort to setting up a virtual machine with the development version of smoothwall and compiling a new kernel and a bunch of modules for myself - more on that later, probably.

Once I got the kernel and modules sorted, I discovered that cbq.init (version 0.7.3), the script I intended to use to perform the ratelimiting, has a bug in it - one which prevents it from working at all. After making a couple of minor adjustments to the script, it works quite well. For future reference, the "-maxdepth 1" arguments on lines 579 and 585 need to be moved up to just after the $1 in the previous lines.

The error in question was repeated once for each config file in /etc/sysconfig/cbq, and read as follows:
find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.

Source: noidea.us
No comments have been posted on this entry. Click here to post a comment.

Axdroid kernel for X50v

Posted on 26 August, 2009 by maximinus in Linux
As you may already know if you've been following the AxDroid project, Ertan has just released a patch for the Android 2.6.29 kernel, to boot it on the Axim X50v/X51v.

Anyone who tried Ertan's original AxDroid alpha on an X50v will be familiar with the touchscreen coordinate inversion - the X and Y coordinates are swapped, which makes it very tricky to use the touchscreen.  Now that the kernel patch is available, I've recompiled the kernel image with the touchscreen driver tweaked to swap the X and Y coordinates to be correct on the X50v.

If you wish to run Google Android (i.e. AxDroid) on an Axim X50v, follow the instructions for installing the AxDroid alpha, except use my patched X50v version of the zImage instead of the one linked in the post:
http://drop.io/x50v_zImage

You should now be able to boot Android using HaReT by following the instructions on the AxDroid blog - and touches on the screen should be registered in the correct locations!
No comments have been posted on this entry. Click here to post a comment.

Xen swap issues

Posted on 12 June, 2009 by maximinus in Linux
Note: This is mostly for my own future reference, but I thought I'd post it here in case somebody else might find it useful.

The Problem
This website (and a few others I run, such as ShrinkThisLink, the free link shrinker) runs on a /Debian VPS, running on Xen.  It had a swap partition configured, but was not using it, and didn't seem to want to.  I found that different methods of getting partition information seemed to be returning conflicting information:
  • the VPS control panel stated that /dev/sda1 was a 1GB swap partition, and that /dev/sda2 was a 5GB ext3 partition
  • `fdisk -l` seemed to agree with the VPS control panel, but added that each drive "doesn't contain a valid partition table"
  • parted also seemed to agree with the VPS control panel
  • `df -h` listed /etc/sda1 as mounted on / and being 5GB
  • /etc/fstab listed /dev/sda1 as a 5GB ext3 partition to mount on /
  • `swapon -a`was returning "swapon: /dev/sda2: Invalid argument" - which seemed to state that /dev/sda2 was the swap partition
So, of those I tried, three methods suggested that sda1 was swap; three methods suggested that sda2 was swap.  With it being a dead heat, I wasn't willing to try anything such as running mkswap on either partition (not that I'd have tried it with any inconsistency at all).

The solution
It struck me that if I could determine the actual swap partition's UUID, I might be able to do something of use with it.  Running `blkid` provides a convenient list of partitions, their types and their UUIDs - so I looked for the partition listed as having TYPE="swap" (which was listed as /dev/sda1).

Armed with the swap partition's UUID, I modified the line of /etc/fstab relating to the swap partition - changing "/dev/sda2" to "UUID=" followed by the swap partition's UUID.  Once this change was saved, `swapon -a` returned with no errors, having successfully enabled the partition as swap.
No comments have been posted on this entry. Click here to post a comment.

Cisco.com's lost a letter...

Posted on 25 September, 2008 by maximinus in Web design, Web development
And by a letter, I don't mean a single character - I mean all instances of the lower-case letter "t" in the HTML source of the site.  This includes all HTML tags and their attributes (names and values) - leaving the site without styles and javascript:

Here's the top of the page:

Update: Cisco seem to have fixed the issue - whatever it was.

No comments have been posted on this entry. Click here to post a comment.

Slightly Stricter Scripter

Posted on 6 August, 2008 by maximinus in JavaScript, Web development
A while back, I started writing a web app, which still hasn't quite made it to public availability - but which I use myself, even in its incomplete state.  I knew as of the first public beta of Firefox 3 that this app didn't seem to work at all in Firefox 3 - but I was never terribly bothered about why.

Tonight, I decided that it was finally time (since I now use Firefox 3 on my laptop, desktop PC and work PC) to investigate the cause of the problem.  For some reason, nothing was rendering at all once I logged in to the app - I was left with a white page.  There's some static HTML content which should have been displaying, even if there had been JavaScript errors - which Firebug reported none of.

I started using Firebug to poke around, and I noticed that the static HTML content was indeed being returned in the HTTP response - but for some reason was not being rendered.  I looked a little more closely, and noticed that I'd been lazy with one of my script tags, and closed it as a one-sided tag (<script src="..." type="text/javascript" />) - which is technically invalid, but Firefox 1.5 and 2, Opera and even IE6 (I haven't actually tried it in IE7) didn't seem to have a problem with.  Firefox 3, on the other hand, handles this error in a rather odd (and annoying) manner: it eats the rest of the page content.

What I mean by this is that the page content totally disappears from the DOM - it appears that it first treats everything which follows the malformed script tag as the tag's body - but then downloads the external .js file and replaces the tag's body with its contents, thus losing the rest of the page.  If, like in my case, the malformed script tag is in the <head> section of the page, you'll simply get a white screen, since the entirety of the <body> section is lost in this way - along with any onload events defined in the opening <body> tag (hence the lack of JS errors).
Currently listening to: Coldplay - White Shadows
No comments have been posted on this entry. Click here to post a comment.

smtp2web

Posted on 9 June, 2008 by maximinus in Web development
After introducing me to Google App Engine upon its release, Arachnid has just released a nifty tool designed with App Engine in mind - smtp2web, an SMTP to HTTP gateway.  If you're looking for a quick and easy way to allow your web application to receive emails, look no further - you can either set up a single @smtp2web.com email address, or point an entire domain's MX at smtp2web, and it will POST the messages it receives to your site for processing.  You don't have to use App Engine to use smtp2web, but it's very simple to use smtp2web with App Engine apps...
One comment has been posted on this entry. Click here to view.

CAPTCHA'd

Posted on 23 May, 2008 by maximinus in Web design, Rant, Web development, Interface design
I'm sure you're all familiar with CAPTCHAs - those annoying things which require you to type in a bunch of letters and numbers from an image which tries to make it difficult for computers to read said characters.  I've seen several different varieties - ranging from fairly basic text (which doesn't do much to hamper OCR efforts), through ones which use really curly fonts, lines through the text, shapes intermingled with the characters, ones which have a picture of a cat or a dog on each letter, asking you to enter all those with a cat or all those with a dog.

The original idea behind CAPTCHA systems was good; I agree with it in principle.  However, spammers have found ways around many of them, including "data entry business opportunities" - which they send spam about, luring people to fill in CAPTCHAs for them, for use in submitting spam to websites - or, alternatively, simply getting them to post the spam.  Unfortunately, the trend seems to be to make the CAPTCHAs harder to read, which doesn't cut down on this as much as it would if the spammers were simply using OCR to attempt to decipher them.  All it does is make it more of a nuisance for legitimate users of the system.

My latest struggle with such a system involved an attempt to sign up for a forum account - which took me three goes.  Each attempt involved attempting to decipher a CAPTCHA image, which was so poorly done that 5 and S were utterly indistinguishable (perhaps they would have been, had I seen both at once; however I only ever saw one - (it looked like) the same one, in each of the three instances... I can't remember which it turned out to be).  Not only that, but I had to enter my desired password twice on each attempt, and answer a (fairly straightforward, although sometimes slightly ambiguous) question, which, like the CAPTCHA, changed each time.  I was so frustrated with this that I was going to completely give up on registering if it had failed me one more time.

The biggest problem with this was not even that the CAPTCHA was unclear - it was the fact that I had to attempt not only a new CAPTCHA, but a new human verification question each time (despite having passed the first and second), and re-enter my password a further two times per attempt.  Some systems also offer an audio alternative to the image; this option was also missing from this particular system.  Without this audio alternative, even if I could decipher all the other characters in a given CAPTCHA, if it had an S or a 5 in it, I had a 50% chance of failing it.

I wonder just how many people give up on posting a comment, registering an account or performing some other action on a website, simply because they can't decipher a CAPTCHA image?

EDIT:
Oh, one more thing - Sam Ruby raises a good point, which is highly related to my recent experience - when you've verified that somebody's a human, remember it!  Sure, expiry is probably a good thing - re-check periodically.  But presenting three different questions as well as three different CAPTCHAs and requiring me to type (and thus send via unencrypted HTTP) my password six times in order to register, simply because one of the two forms of human verification is poorly designed?  That's just overkill.

UPDATE FOR TAGGED.COM USERS:
Several people have posted comments stating that they are having problems with a "captcha fail limit exceeded" error on tagged.com.  I have removed all these comments as nobody was getting anywhere.
Tagged.com's help section states that the problem has been fixed - click here for more details.
If you are still experiencing this problem, you'll have to try contacting Tagged's support - click here.  I cannot provide any further help or information, as I am not a user of Tagged.com or in any way associated with it.
No comments have been posted on this entry. Click here to post a comment.

A Bit of Feff

Posted on 29 April, 2008 by maximinus in Rant
Or, Geek Etymology 101

Spotted on IRC:
<Fredd> http://www.fileformat.info/info/unicode/char/feff/index.htm
<Fredd> Since alt+FEFF is the entry code for MS windows
<Fredd> I will now be referring to useless banter as feff
<Fredd> I believe this is excellent etymology for a geek term

I agree with him on that one - it's a perfect, geeky method for creating new words - with the bonus that they're going to be short and snappy.  I also think that feff is a great word to describe useless banter; it just sounds so utterly devoid of meaning that it fits like a glove.  I'll certainly be using it from now on - and I hope to see it come into (somewhat) common usage.  Wouldn't it be great to get a word derived from a unicode character's hexadecimal codepoint added to the dictionary?
No comments have been posted on this entry. Click here to post a comment.

Semantics

Posted on 23 April, 2008 by maximinus in Rant
Is it just me, or have Bethesda Softworks forgotten the meaning of the word "demo" (in the context of a video game)?  Pete Hines of Bethesda has announced that there will be no demo of Fallout 3.  To quote bit-tech.net:
Hines explained that because Fallout 3 has been built as one thing, "there's no way to portion off a section and have it stand on its own without putting the whole game in the demo, which we're just not going to do."

He then went onto say that because of the open, free-roaming nature of the game, a demo would prohibitively limit the experience.
Forgive me if I'm wrong, but isn't that the very definition of a demo?  Is it not short for "demonstration" - meaning that it provides, in the case of a video game, a limited experience?

Admittedly, I'm not familiar with the game, but I can't really think of any way in which a game could be structured which would prevent a demo from being feasible.  So it's "open" and "free-roaming" in nature?  Surely the demo could be confined to a specific area - with a limited number of objectives available?  Sure, it won't give the full experience of the game - but it would give a feel for what the game will be like, such as the interface and playing style.

Surely Bethesda are shooting themselves in the foot with this one.  Give your potential customers nothing to try out for free, and they'll give you no money - I think it's fair to say that many people who would have otherwise played the demo and then gone on to perhaps purchase the game will, instead, turn to piracy to find out what the game's like.  Unfortunately for Bethesda, once you've pirated it to find out what it's like, especially if it's not an absolutely mind-blowing game, many such people will then, having already pirated it, lack the motivation to shell out hard-earned money for something they've already got - especially if it's not an absolutely mind-blowing game.
No comments have been posted on this entry. Click here to post a comment.

POSTing cfajaxproxy

Posted on 1 April, 2008 by maximinus in JavaScript, Web development
On a similar tack to the URL length limit mentioned in my post about the moonwalking kiwi, today I discovered a minor issue with cfajaxproxy, along with the (very simple) solution.

By default, cfajaxproxy will use HTTP GET requests to interface with the server, which is all fine and dandy if you're just passing in an ID or two to the function, and expecting data back from the server.  However, if you're using the proxy to send data back to the server, you'll probably want to set the proxy to use POST rather than GET - otherwise you run into length limits related not only to the browser (and its XmlHttpRequest object), but of the webserver.  IIS in particular seems to have a lovely habit of returning cryptic 500 errors complaining about bad verbs.

As I said, once you've found out how to do it, it's very simple to make a proxy use POST.  Once you've created the proxy class using the <cfajaxproxy> tag, you instantiate it as per usual, and then use its setHTTPMethod function:
<cfajaxproxy cfc="yourapp.cfcs.bar" jsclassname="Bar">
<script type="text/javascript">
var foo=new Bar();
foo.setHTTPMethod('POST');
</script>
You can then proceed to use the object ('foo' in the example above) as before, without having to worry about exceeding the URL length limit(s).
No comments have been posted on this entry. Click here to post a comment.

Got Worms?

Posted on 18 March, 2008 by maximinus in Rant
I recently discovered, whilst trying to send a link from my laptop to my desktop machine, that Microsoft have evidently decided to finally do something about the Messenger worms that spread by sending links in instant messages.  You might think that it's great that they've finally done something - that is, until you find out what they've actually done.

So, what have they done, you ask?  Did they fix the hole(s) that the worms were using?  I'm not sure, but what I do know they've done is block all messages containing a URL containing "download.php" - if you try to send one, the message will be bounced immediately by the Messenger servers.  Even if they have fixed the holes which the worms have been exploiting, this is a ridiculous move - I shudder to think just how many legitimate messages are being bounced because of this.

To make matters even worse, there's nothing to say why it bounced - it just gives the standard "the following message could not be delivered to all recipients" message, which is used when a message can't be delivered for a legitimate reason.  Pidgin is a little more helpful than Microsoft's own client, stating that the "message may have not been sent because an unknown error occurred" - with other causes giving different messages (similar to that, but with "unknown error" replaced with something more specific).  The correct response to a threat such as a self-propagating worm is never to use easily-bypassed filtering to attempt to detect the worm's behaviour and block it - especially if such a filter is going to also block large amounts of legitimate usage.
Currently listening to: The Flame of Youth - Dragonforce
No comments have been posted on this entry. Click here to post a comment.
Page 1 of 4 «First | <Previous | Older > | Oldest »