2010-12-16
Pulse-o-matic now on App Store
Cheers,
Steve
2010-09-21
Thoughts on HTML, computer programs, and programming languages
My argument for HTML as a programming language is very abstract, and to put it simply: programming languages are used to express instructions to the computer on what to do. HTML instructs the computer on how to display content, therefore HTML is a programming language. Against this argument are the following, which can be encountered on any number of programming websites.
The most common argument against HTML being a programming language is that it describes itself as a markup language, as evident by the M in HTML. I find this argument wanting on 2 fronts: a) it implicitly assumes that a markup language can not be a programming language. TEX is a good example of a language which 99% of the time is used for markup, and the other 1% for programming; b) this argument is superficial. It implies if I was to simply rename HTML to HTPL, hypertext programming language, then *poof* now it is a programming language without having changed any of its characteristics. A rose by any other name...
A better argument is that HTML doesn't have control structures, whereas programming languages do. Suppose we accept this argument, which implicitly requires programming languages to support control structures. Consider a strict subset of LOGO, called miniLOGO that contains only the turtle graphics part of LOGO and nothing else - no loops, no conditionals, no control structures. By the definition we have assumed here, miniLOGO isn't a programming language. Now suppose you write a program in miniLOGO to draw "hello world" on the screen, what have you written? I (and most people) say it is a program. This then presents a problem: you should not be able to write a program with a not-programming-language. At least it is a problem for me.
Suppose now you say no, the miniLOGO hello world isn't a program, and you give one of two reasons - that it doesn't contain control structures or that it wasn't written in a programming language. The first reason implicitly defines all programs as those containing control structures. I can not accept this reason because you can make a non-program a program by injecting a control structure with no side effect, and it is no less absurd and no more useful than the accepting HTML as a programming language. Not to mention the millions of introductory programming texts that will need to be rewritten so "hello world" contains an unecessary control structure. (There are those who will then say: there ARE control structures, they are just a few levels of abstractions down. Well there are similar control structures in a browser. We do not worry about the rest of the abstraction stack, only the top of it).
For the second reason, consider what happens if I write the same program in full is-a-programming-language LOGO. Now it is a program by the virtue of having been written in a programming language, which brings us to an uncomfortable place: now we two things which are absolutely identical, but one is a program and one isn't by virtue of their parentage. Accepting this position is no more absurd than accepting that HTML is a programming language.
The final argument I will discuss is that my definition is such a generic definition just about anything is a programming language, therefore that definition is next to useless. This I agree with. However as I have (hopefully) demonstrated, it isn't easy to come up with a definition of what is a programming language (or in fact what is a program) that isn't contradictory or would invalidate millions of simple programs around the world.
I am still giving this issue thought, but until I am a more learned person in CS and possibly philosophy, my choice is between a definition of programming languages with low discriminatory powers, or ones which are fickle and contradictory.
HTML-is-a-programming-language, I choose you!
Cheers,
Steve
2010-07-09
Why Even Techies aren't Immune from the Filter
I am not worried about the filter. Even if they put it in it will just slow things down a bit but we all know how to get around it.At first glance this seems reasonable, after all it is true. It however ignores the fact the filter is not just a mechanism for stopping "naughty" content. The government can easily abused the filter and use it monitor attempts to access blocked content. In other words the government will be able to construct a list of "naughty" people.
You might ask
What's the problem with that? Surely having a list of people who attempted to access child porn can only be a good thingIf you are asking this question, then you have been victim to Conroy's propaganda. The filter doesn't block just child pornography, it blocks all refused classification (RC) content. At least it is suppose to. The list of websites to be blocked will not be available for scrutiny. In other words, if the filter were to block content on such controversial topics such as abortion or euthanasia you won't know until you have attempted to access such content. By then it would be too late - the government now knows you tried.
The number of ways such a list of "naughty" people can be abused is beyond counting. Suppose the police needs a few child pornography arrests to look good. They just need to go through the list looking for a few poor souls who stumbled on their internet travels. Bang! A list of people whose privacy will be thoroughly violated as the police fishes through their background looking for dirt. God help them if they have actually broke some trivial law in our complex legal system.
But wait, you say,
Isn't attempting to access refused classification material wrong?The answer is no, unless it is child pornography. The national classification code allows adult to read, hear, and see what they want:
Classification decisions are to give effect, as far as possible, to the following principles:
(a) adults should be able to read, hear and see what they want;
RC material can not be shown, sold, and possession for the purpose of sale or display is illegal. But to consume it with in the privacy of your own home is no crime [1]. As an adult what you chose to read, hear and see is your own private business.
I am well aware this is a slippery slope argument, however I don't think it is outrageous or preposterous. Governments love to monitor what their citizens do [2], censor what they see, and control what they do. That is almost by definition. To imagine the government to pass up on abusing the filter mechanism is difficult to imagine. It would require integrity on their part, something that has been conspicuously absent thus far.
Hang on, I hear you say,
How does this affect me, who always uses an encrypted connection?
If you have done nothing wrong, what have you to hide?Remember that Conroy is so incompetent he doesn't even know online banking is encrypted.
The bottom line is this: don't allow this invasion of our privacy the chance to snowball just because it doesn't inconvenience you (yet). Nib it in the bud.
At the next election, vote below the line and vote for the parties against the filter: the Greens [3], the Nationals [4], and if they make it in time, the Pirate Party Australia [5].
Cheers,
Steve
2010-06-15
Ben NanoNote First Impressions
Recently unboxed my Ben NanoNote, and I am impressed. The packaging was top-notch and classy as hell. I would not hesitate to put my name to it.
The NanoNote itself is tiny, and feels fairly solid despite the shiny-appearance which I have come to associate with cheapo devices. It's a nice little package, the only issue being the lack of cover of some sort for the micro-SD card slot, which is odd considering the USB port does.
For those wondering, the keyboard has good tactile feedback, though there is no way you are touch typing on this.
There is a microphone opening and a speaker grill, though I have no at this time exercised any of those functions.
If you are wondering what the Ben NanoNote is, here is a little background:
Ben NanoNote is a $99 device which runs OpenWRT. In and of itself this is nothing special. What is special is the copyleft hardware - you can download the schematics off qi-hardware. For hardware meddlers like myself, this is a boon: we can do many interesting things when we know exactly what is available to us and how.
The copyleft nature of the NanoNote hardware is that anyone else can build their own 100% compatible NanoNote variant. This allows immediately opens the platform to competition, and it also gives product developers peace-of-mind: you can always make your own Ben NanoNote, even if qi-hardware stops making them.
In many ways, the Ben NanoNote is like the arduino: here is some hardware and schematics along with a software platform/SDK with source. Now go wild.
Cheers,
Steve
Open Letter to Silicon Chip Australia
Dear Silicon Chip,
I recently cancelled my print subscription. You are no longer a magazine I wish to support.
Political commentary on topics like the insulation scheme and global warming has no place in an electronics magazine. The editor(s) are using the mailbag section to push their own agendas and opinions on the rest of us. I can no longer tolerate such non-sense, and have no interest in financially supporting a magazine that is so set on disinformation and irrational discourse.
Let me be clear: I am not cancelling my subscription because of the beliefs of the people at SC. I am cancelling because SC is being used as a platform to spread those beliefs. Whether or not SC believes in global warming, or that the government is at fault for the deaths from the insulation scheme, commentary of these issues are best left to newspapers. They have no place in a publication about electronics.
On other thing, the filler article reviewing consumer electronics (e.g. MacBook) is most annoying. It lowers the standard of the magazine. If you really have nothing to write about, go find some interesting arduino variants, like the jeeNode, and review one of those.
You have lost your way SC, and it is a sad thing to have to let you go. Maybe we can get back together again.
2010-06-09
Script to make IPAs for ad-hoc distribution.
PRODUCT_NAME=""Designed to be ran from the command line, but it should be easily made into a build phase.
IPA="${PRODUCT_NAME}.ipa"
APP="${PRODUCT_NAME}.app"
if [ -z "${PRODUCT_NAME}" ]; then
echo "PRODUCT_NAME not set";
exit 1;
fi
rm -rf ipa
mkdir -p ipa/Payload &&
cp -R build/Debug-iphoneos/${APP} ipa/Payload/ &&
pushd ipa &&
zip -q --symlinks -r ${IPA} Payload/ &&
mkdir test/ &&
cp ${IPA} test &&
cd test &&
unzip -q ${IPA} &&
cd Payload/ &&
codesign --verify --verbose ${APP} &&
popd
open ipa/
Cheers,
Steve
2010-05-08
Discouraging File Sharers at LANs
My friend laments that he hasn't found a nice way to deal with file sharers such gamers aren't impacted, since some file sharing is required for games installers, updaters, drivers, etc. Any kind of port blocking, packet inspection, real-life-what-are-you-doing inspection are right out for the reasons of impotency, latency, and privacy.
After some discussion, we came up on the following idea to discourage, not ban, file sharers: limit upload rate of all ports. This won't affect 99.99% of gamers since games use very little bandwidth, and it still lets you download at full speed. This however impacts significantly on file sharers: the theoretical maximum downstream a file sharer can achieve is n-1 * upload_rate, which assumes everyone else is giving him their upstream bandwidth. Make this theoretical maximum low enough, and file sharers are better off using sneaker net.
There is an elegance to this that appeals to me - it exploits the fact gaming prioritise latency over bandwidth, and file sharing bandwidth over latency. It is also resistant to circumvention - because this can be implemented on the data link layer, it isn't something file sharers can get around by changing ports or using encryption.
If you know of any LANs that implement this policy, or run a LAN implementing this policy, I would love to know how well this idea performs in the real world.
Cheers,
Steve
2010-03-26
Notes on PHD Guiding
- Maximum RA guide pulse is 1000ms (1s). If PHD is not locking on to the star and it says "dur=1000" in the status bar, a better polar alignment is required.
- RA hysteresis is used in a 2-term weighted moving average:
RA_dist = (1.0 - RA_hysteresis) * RA_dist + RA_hysteresis * last_guide
Cheers,
Steve
2010-03-11
Auto-generating CoreData Classes
If you have a xcdatamodel file, open it, and using the menu: File > New File > Cocoa Class, you will see an extra item: Managed Object Class. This will autogenerate the required header and implementation files for your CoreData entities so you can use the convenience accessors instead of [setValue:forKey:]. Doing this will also update your data model so your entities won’t have NSManagedObject as their class. Instead their class is the corresponding generated class.
The thing is, you won’t see “Managed Object Class” item unless you have opened the xcdatamodel file and it is the front most window.
Naturally I discovered this by accident just as I was about to hand write the last CoreData model class.
Cheers,
Steve
2010-03-10
My First Galaxies (Kinda)
Last night, with my Canon 1000D I caught the barest glimpses of M83 and NGC 5128, aka the Hamburger galaxy, aka Centaurus A. The pictures are below, all taken at ISO1600 and 30s exposure time.
This however doesn’t really count - I didn’t see it with my own eyes. This is not conceptually different to seeing (much better) pictures taken by Hubble and other telescopes.
Time to start saving up for a bigger telescope.
2010-01-28
Shorty Awards Audit Part 2: Exception or The Rule?
- deleted accounts: 449 (13.98%)
- accounts with 1 tweet: 21 (0.65%)
- accounts with 2 tweets: 32 (1.00%)
- other accounts: 2706 (84.27%)
- total: 3211
2010-01-27
Shorty Awards Audit
To that end I wrote a python script to "audit" shorty award votes. Given a username, the script will scrape shortyawards.com for voters, and hit their twitter.com profile to generate a file containing 2 columns: username and number of updates. Users with deleted accounts will have -1 updates.
I have ran the script for @mercola, and at the time of data collection (UTC 1100) this is the breakdown of where the votes came from:
- deleted accounts: 348 (12.07%)
- accounts with 1 tweet: 407 (14.11%)
- accounts with 2 tweets: 288 (9.98%)
- other accounts: 1838 (63.71%)
- total: 2885
- deleted accounts: 113 (6.50%)
- accounts with 1 tweet: 41 (2.35%)
- accounts with 2 tweets: 47 (2.70%)
- other accounts: 1542 (88.42%)
- total: 1744
2010-01-10
An Idea for Personal Domains
Given that we can have purely numeric domains, i.e. 131500.info, why not have domains that map to our mobile phone numbers for personal use?
What's the point? For one, you can give out your public mobile number instead of your website, since it is much easier to communicate numbers than domain names. This can be used to communicate other information that is difficult to convey by voice, e.g. emails, skype names, etc. A simple website at $your_mobile.mob would overcome all these.
This obviously has privacy implications, and as such should be entirely opt-in.
Any such system would need to be regulated, ideally controlled by carriers. A custom TLD like .mob would probably be a good idea too. One must also keep in mind however that such easily predictable domain names will be targeted by spammers.
Cheers,Steve
2010-01-05
Introducing GeoNote AR (2.0)
Some of you might know I have been working on a little iPhone app called GeoNote (iTunes link). Its basic goal is to allow you to annotate the real world by allowing you to leave little messages (notes) which are "pinned" to real world locations. These little messages are visible to anyone running GeoNote.
Initially GeoNote had a rather unflattering interface: just a List View of notes. However as the iPhone SDK and the iPhone itself evolved, GeoNote also evolved. First it gained Map view, which was much more intuitive and useful, then with the iPhone 3GS and a bit of time on my hands, GeoNote gained Augmented Reality view:
Cool isn't it :D It is available in GeoNote 2.0, but only for people with iPhone 3GS. GeoNote will run on iPod touch and iPhone 3G, but AR will not be available.
The Augmented Reality View is activated by holding the phone up like you would to take a landscape picture, with the home button on the right. The colour scheme is customisable, since I haven't found a nice set of colours. It looks rather retro'ish with the default green colour scheme:
There are a lot of things that cane be done better, like a nice way to select notes, and more customisation for things like limiting distance, etc. But as they say, release early, release often :-)
For more on the app, visit: http://gtd.pictorii.com. It is rather nasty right now, I will work on that :)
Cheers,
Steve