## Posts

Showing posts from 2013

### Can't open Google Docs Template Gallery

I've been hit by a nasty bug just as I'm planning to use Docs Templates. You will be greeted with the following error if you visit the Google Docs Template Gallery:

It seems that they have been working on the issue for almost a month now:

A workaround for now is to visit a filtered view and then navigate using the types and categories on the left:
Neither the Docs, nor the Presentations type works for me, however any kind of document can be returned if you narrow by category instead and prune the type=... part from the resulting URL. You can also do the same trick with the search box.

### Naked domain works once again

After all these long years, apex domain finally works at my new host. I can resume distribution of my previous business card now that the URL isn't broken anymore. Best present from Barnabas and David, thanks guys!

### Receiving FM radio without an antenna

I've started experimenting with my TV & radio tuners. One of them gets perfect reception on 15 of the 17 nearby FM radio stations in the area. It gives acceptable quality on the remaining two talk radios. It's an Asus 3in1, supporting hybrid PAL/DVB-T/DVB-S/FM.

My UHF TV aerial is just a bare wire of proper length at the end of an extension cable. FM reception gets a bit weaker on some channels after disconnecting it. I've tried to disconnect every cable except the display, power and keyboard to no effect.

A proposed explanation is coupling through the power lines and/or improper grounding. Three of the broadcasts are high power regional transmitters with nearby origin. The rest are local ones with reduced power that also transmit from the surrounding hills.

I made a script that uses fmtools to scan and tune in channels. It also coordinates digital audio capture and playback from the card's ADC. I've also experimented with gnomeradio. Unfortunately, I had to us…

### Beating the averages - succeed in business

"Back in 1995, we knew something that I don't think our competitors understood, and few understand even now: when you're writing software that only has to run on your own servers, you can use any language you want."

Paul Graham describes how they had great success with webshop SaaS a decade before the concept became mainstream. They stayed ahead of the competition by not shooting themselves in the foot, adding:

"We were just able to develop software faster than anyone thought possible."

The end result speaks for itself:

"The people who understood our technology best were the customers. They didn't care what language Viaweb was written in either, but they noticed that it worked really well."

Although the story is from two decades ago, the lessons learned seem to be evergreen, so it's a good reading: Beating the averages (2001)

### Minification is not enough, you need tree shaking

This is one of the reasons I advocate improving your tools before you start to solve complicated projects. ECMAscript was created in the past millennium for messing around with your cursor and making text blink. Any serious use is a kludge. Big respect for people making superhuman efforts to develop working web applications, but why make your life more difficult than it needs to be?

"If I had eight hours to cut down a tree, I would spend six hours sharpening my axe" - attributed to Abraham Lincoln

Check out Minification is not enough, you need tree shaking on Seth Ladd's google engineer's blog

### Entrepreneur who recycles everything

I have been advocating all along that those who produce, shall be mandated to take care of the whole life cycle of their products. It's refreshing to hear that a brave individual has successfully built a viable business model behind this concept.

http://www.huffingtonpost.com/2013/07/30/terracycle_n_3678691.html

### ZTE K3772-Z works out of the box on Lubuntu

Enough said, you simply click the network icon in the tray, and select "enable mobile broadband".

### Please wait a bit for Apps Script, then wait a bit more

An unescaped stray plus in a regexp caused all scripts in my project to fail to trigger, not just the ones within the error's reachability tree. I was presented with the following notification when trying to start one manually:
We're sorry, a server error occurred. Please wait a bit and try again.
I usually discover such complex interactions earlier, but in this case I was tired and I wasn't in a hurry, so I blindly chose to wait until the "server error" gets resolved. I've only STFW after getting back to see if the issue has resolved by itself.

StackOverflow: Google Apps Script: We're sorry, a server error occurred. Please wait a bit and try again

Specifically, the code contained:
string.replace(/+.*$/, '') instead of string.replace(/\+.*$/, '')
The editor doesn't let you even save the file if it contains any other kind of syntax error, but this behavior seems to be some kind of a bug.

### HTML5 connection speed test

SpeedOf.Me - online HTML5 bandwidth test
It runs both on desktop and mobile, as no Flash or Java is needed!

### Trickling of bug fixes

I've been bitten by the following bug from 2009 which has a proper fix in git, yet the stable package doesn't even have a workaround for it. That's agility for you!

And let's not talk about the memory safety issues this bug again brings up.

### Google Apps Script external version control almost here

Many have desired to collaborate in the development of Google Apps Scripts. Two outstanding issues had been open for some time in this area:
Issue 1959: Collaborative editing of scripts
Issue 217: Make Google Code the back-end version control for collaborative scripting

A feature offered from June enables API access of script source code. This potentially enables connection to an external repository, like Google Code or GitHub. See the linked screencast and talk or the API below.
YouTube: Apps Script Crash Course: Import/Export Apps Script Code

Google Developers: Importing and Exporting Projects

After breaking this barrier, I can now start gathering some of my more useful scripts to share via bkil-open, though I'll probably simply copy&paste for now.

### Gmail guessing your keyboard and text

I haven't noticed the keyboard layout switcher yet. How come it automatically contains exactly the three layouts which are relevant for me?

I've found out earlier that both Search and Translate can correct your input if it makes more sense in some other popular layout, like Russian. What else is there under their sleeves?

### Nano chess engine at 19 lines

I've minified bkil-open: edu/ai/nanochess.hs to 19 effective lines of code in Haskell, and I'm running out of ideas. The goal was to construct a tiny snippet of code that illustrates a real chess engine instead of the ever boring 8-queens. It still wouldn't fit on a black board properly without further pruning.

At the same time, trivial concurrency has been introduced to bkil-open: edu/ai/minichess.lhs, which seems to give it a linear boost. My next step in the area is to add interaction and eventually introduce a more advanced algorithm like alpha-beta to gain playable speed on a full board with complete rules.

### DVB-T XMLTV EPG grabber complete

It runs on over the air broadcast, so you won't see any more grabber failures because of a website that decided to change their design (deliberately).
bkil-open: tv/grab-dvb-epg.sh

### New achievement: Ubuntu enablement successful

Actually it is not an option for Ivy Bridge, it is a must! In my opinion, a patch would have been in order to the LTS kernel.
https://wiki.ubuntu.com/Kernel/LTSEnablementStack

Some background:
linuxquestions.org: [SOLVED] kernel 3.2.x causes system freeze on Intel Ivy Bridge platform(e.g. ThinkPad T430)?
Launchpad: [IVB]12.04 64 bit System freezes (mouse, keyboard)
...

### Disable text drag and drop in browser

I have never in my life got any use out of moving text by drag and dropping of selection inside a textbox. However, it has messed up my texts on numerous occasions, of which I might not have noticed it on every instance. Do you know which wise guy's idea it was to standardize on this?

Stack Overflow: disable text drag and drop

### Deleting your swap - the hard way

A default clean install usually doesn't fit me. However, I've installed Ubuntu LTS just like that on this machine when both were new. It has a small but fast SSD. It has been working flawlessly until now.

I've recently reconsidered that I could use a bit more space. From experience, I never had a need for swap, as I'm using zram. So I've decided to simply delete the swap partition.

Of course, solving it simply was only my dream. Technically, you need to delete the swap partition, optionally move middle partitions to the end, expand your root file system and be done with it. I've first made whole disk backups. I've booted off a flash drive containing Ubuntu 12.10. Deleting the partition with GParted was a breeze, as well as marking the rest of the needed operations, move and resize. But there was a catch: it bailed out with a cryptic message halfway. (I think it was "GNU Parted cannot resize this partition to this size. We're working on it!")

A…

### Daily disk array spinup at 7:34

While it may sound like utter nonsense at first, on second thought maybe it really is: cron.standard: please provide configuration facility to avoid given filesystems
Someone should really be thinking more about a serious reminder system.

I've put together an iotop oneliner that logs disk actions with timestamps which pointed me to anacron. Daily mlocate updating was easy to reproduce and fine tune: simply add your HDD mount points to tho PRUNEPATHS variable of /etc/updatedb.conf.

On the other hand, it took a few more attempts and many days in total to track down what causes the HDDs to still start up. When trying to further examine the issue by hand, /etc/cron.daily/standard didn't start them up on first look, perhaps because of caching. However, today after randomly testing things again, it finally did, which took me to adding CHECK_LOSTFOUND=no to /etc/default/cron.

It's a pity though, that I'll have to use an alarm clock from now on.

### Classical music played at Astra launch?

Anybody knows what music they played on Astra in the 90s in the background on the information channel where they showed new satellite launches? Not sure, but I think it was the Ariane series vehicle. I recall the composition mostly used a single bowed string instrument, maybe a cello.

### Crowdsourcing and processing articles

Crowd workers are not online Shakespeares, but Carnegie Mellon research shows they can write
"(...) the research team led by Aniket Kittur, assistant professor in CMU's Human-Computer Interaction Institute (HCII), found that the crowdsourced articles compared favorably with articles written by a single author and with Simple English Wikipedia entries." Programming crowds

### Ergonomy - provide editing context

A good rule of thum is to always provide proper context for the user.

In case of a text editor, it's the de facto standard to only scroll the screen when the text cursor would leave the visible window. However, consider the use case of composing an answer to a letter. It feels more comfortable to be able to read a bit ahead, as well as back in this case.

Toggling full screen via scroll lock was a working strategy in the past, though only a few editors support it, and nowadays less and less keyboards have a button for it...

There exist another breed of editors which, on automatic page scroll, advance only a small proportion of the editing window at a time.

A third possible implementation would scroll in such a way as to always position the cursor in the middle of the editing window. I have constructed a few prototypes on this paradigm way back in primary school which worked nicely to me.

### Huawei E3131S-2 on Ubuntu 12.04 with wvdial

It works out of the box with a plain wvdial after a small adjustment (need to erase the +FCLASS=0 part). It is detected as the following device (after the automatic mode switch):

ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard

For the record, I paste the wvdial.conf configured for T-Mobile in Hungary:

[Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Init3 = AT+CGDCONT=1,"IP","internet" Modem = /dev/ttyUSB0 Username = wap Password = wap Modem Type = Analog Modem Baud = 9600 New PPPD = yes ISDN = 0 Phone = *99# Stupid Mode = 1
Most of the settings are not crucial, but some of them depend on your carrier, like "Init3", "Username" and "Password", while "Modem" depends on your device.

### Starting the IPv6 revolution

I'm in the progress of setting up working IPv6 on all computers I have access to. I'm fed up with all the hacks needed for properly accessing devices remotely.