|
|
The (quasi) technical blog of Adam Bishop
|
|
|
|
Control anything on OSX with a webpage
Tuesday, January 16, 2007 7:22 AM
I was messing about with applescript and a bit of PHP, and found that it's possible to use php to call applescript commands. The zip file contains a sample page for controlling iTunes, and a readme containing the 4 lines in httpd.conf that need to be changed. For more complex commands (such as tell blocks) the ocascipt has an argument to accept a file, or to take the commands from standard input. The example is very simplistic, but right now I'm sat on the other side of the room with that page pulled up on my PDA, and is obviously as extendable as you want it to be. http://uploads.omega.org.uk/Applescript.zipThe developer documentation for applescript can be found here if anyone is interested in further developing the sample.
Vista *finally* installs
Saturday, April 22, 2006 12:42 AM
After weeks of trying, I finally got vista to install on my box. Turns out, to make it work with my graphics card, the installer has to be run in safe mode, and when it boots for the first time, it is sending video out on channel 3, so you have to change the DVI cable about.
I hope this issue is sorted out before the final release, else I will seriously consider going Linux.
Kidding, I love OS X too much to use linux.
Vista
Monday, March 27, 2006 1:21 AM
New build of Vista.
Still doesn't want to work on my machine though. :/ I'll try it again over easter, see if I can pin down why it won't work.
Vista, The Register, and other bits
Thursday, March 23, 2006 7:29 PM
Hmm, so much for regular posting. Though I did stick to it for my personal blog. I said the next article here would be about a FireFox extension compiler (or, the lack of) but as I haven't looked at it in over a month it wouldn't be appropriate. So. What to write? Well, I got my name on the register, and I currently have modpoints on slashdot. So as far as the internet goes, things are pretty damn good today. Current project is bank account C/w. Currently not working because I can't think of a suitable way to detect null. (a side effect of a corner I cut for last months coursework. Don't cut corners kids, it ain't worth it in the long run). Hard disk in my iBook is becoming a littler noisy. I may swap it for the one in my other laptop. In other news, my Windows Vista installation has expired. Or, at least, locked out until it gets activated. It's a little disappointing as I was looking forward to giving it a thorough going over. I'm impressed by what I saw in the 14 days it worked for, and have a big list of bugs that need to be submitted. However, due to the universities "interesting" proxy server, the feedback client doesn't work. Still, the activation issue should be resolved when I go back home and attach it to my home connection (I just looked at the my ISP's website, NTL, and I can get an upgrade to a 10 Meg connection for £35 a month - r0x0r!) At the moment, is does lack what I call "polish" (something that a lot of open source apps lack, IMO), but thats understandable, as the last release was only feature complete, the optimisation and the tidying up phases are yet to occur. However, looking at Office 12 as a guide for what Vista should end up looking like, which was refreshed last week, I am looking forward to the next build of Vista. One thing I know for sure is that on the day it is released, I will be in the queue trying to download it from the MSDN-AA server. After upgrading my iBook to OS-X 10.5, of course.
A Trojan on the Mac?
Saturday, February 18, 2006 1:54 AM
The BBC seem to have been giving Apple a bit of a bashing lately. They published an article on 16th January about how Mac users were "smug" in their attitude to security. Yesterday, news of a trojan released into the wild for OSX 10.4. As far as I am concerned, Mac users are far from ignorant of security threats. Apple releases security patches at least as often as microsoft, and to the majority of home users (home users being mum and dad) just believe a computer is a computer. If the Mac were to have as many security threats available to it as Windows does, then they would be just as vulnerable, no more, no less, than a Windows user. The same goes for Linux, the extent of the damage on a *nix based system may be less, but as far as "open this file for free pr0n" infections go, Windows, Linux, and Mac if they had equal market share in terms of home users, would be equally vulnerable. Don't forget that the early Mac systems wrote the book on viruses. So. Onto the worm. You first have to accept the file. You then have to decompress it. You then have to open it. You then have to aknowledge the warning that running app's are dangerous. Alarm bells start to ring at this point (if they haven't already. Why is it claiming this jpeg is an executable. Hmmmmmmm...). It then asks for an administrator password. If this infects your machine, you deserve it. From the BBC Article "For example, widgets, small programs that can do things
like search online dictionaries or let you listen to streamed BBC
programs, can be installed without your permission when you visit a
website using the Safari browser, just like Windows does with ActiveX
controls. It took Apple weeks to fix this." I'm not sure what the BBC are getting at here. Widgets are run in a sandbox environment, they can only perform predefined actions (if a widget needs internet access/file access, it has to be explictly declared, and are subject to a very low permission level). As for being installed automatically, they are about as automatic as firefox plugins, and certainly do not do it without permission. As for the comparison with ActiveX, it's like apples and oranges. They are both fruits, but only one goes well with toffee. I'm guessing that the BBC are confusing plugins and widgets. Obligatory Microsoft Jibe: Yes, it took Apple weeks to fix it, but MS call it a feature. Anyway, thats that done. DISCLAIMER: Written on my Windows x64 Edition Machine, Whilst IRC'ing on my mac, and contemplating repairing my linux partition. Next time on TMX's TechBlog: Why won't my firefox extension install?
Isn't technology marvellous?
Monday, February 06, 2006 11:24 PM
After suddenly realising about 30 seconds ago I have subscribers, I decided to update this a little more often (read my other blog, I have made the same promis about 20 times :))
Isn't technology wonderful?
On Sunday, due to a mishap with the TV tuner card, I had to flash the bios. FACT: I did this at 20 minutes past midnight. FACT: This machine is the "master". All my other devices take the time from it. FACT: I am not the most organised of people anyway.
After rebooting, I had a quick squint at the clock (it read 00:04), and everything in the room agreed with it. I assumed NTP would take care of any errors, but it did not because the date had been reset. However, unbeknown (is that a word?) to me, within 15 seconds of me turning the computer back on, the new time settings had been pushed out to my PDA, my Mobile phone, and to my Laptop.
Cue an entire 2 days of me running round totally confused. The advantage of sharing a room with someone who does the same course as you is that if you are in danger of sleeping through a coursework deadline, he is as well, and so he will probably wake you up.
Coursework was handed in with about 20 seconds to spare.
"Computers make very fast, very accurate mistakes." - Unknown
Standards
Thursday, January 05, 2006 3:29 AM
"American railroad tracks are 56.5" wide (the "gauge") because the English built the first railroads in America and they use that width. Why do they use that width? Because the first rail lines were built by the same people who built the tramways, and that's the gauge they used. Why did they use that gauge then? Because the people who built the tramways used the same jigs and tools that were used for building wagons which used that wheel spacing.
Why did wagons have that particular odd wheel spacing? Because older wagon ruts throughout England used that spacing, and if they changed it, wagon wheels would break falling into or being forced out of the old ruts.
The old ruts were that size because the roads were built by the Romans. Their wagons, and their chariots before their wagons, used that spacing, and that spacing was used wherever Rome conquered, because their wagons used the identical wheel base everywhere. So the modern railroad track width derives from the Roman chariot.
Why was the Roman chariot track width 56.5"? Because that was the width of a chariot that would equal the width of two "standard" Roman horses." (1)
The truth of this story may be dubious, but the message is clear.
Standards are often adopted not because of their individual merits, pros, cons, limitations or other suitable criteria, but because "everyone uses it", or because it will require nothing to be modified.
One example that springs to mind is SQL. I cannot see why someone would make such a difficult and flawed language a standard. SQL is perfectly suited to simple send, get, modify requests. But anything beyond that becomes a problem.
Take the select syntax. Say we are a publisher, with 100,000 clients. We store our client data in a database, with 60 columns, one of them is a longtext field which stores the book that the author has written.
Your boss then tells you that once a day, a program needs to print out a report of all the data, minus the book.
The first thought is to just grab the entire table with a SELECT *, but oops, the entire table is a few gigabytes in size, and takes a huge amount of time to transfer. the other option is to make a SELECT query with, minus the field we don't want. To do this, you would need to list out all 59 fields. While not a problem for a computer, for a developer this is a nightmare, to write in the first place, to debug, and to maintain.
This could be alleviated by putting the books in a separate table, however, in my opinion, that is wrong. Though sometimes unavoidable, the limitations of the language should not dictate how you write a program, to the extent where to perform a simple task, you have to change the entire structure of the database.
A programming language is a tool. If you were trying to put in a screw, and the screwdriver did not fit, you would not find a different sized screw, you would find a tool that did fit.
There are numerous other examples of why I feel SQL is flawed, but I will not list them here. The above is just to illustrate an example. If there is demand for it, I may write 101 things wrong with SQL.
A current example of standards possibly not being chosen for the right reasons is ODF vs MS XML Reference Schema, and its use in Massachusetts.
Almost all reports I have read seem to be focusing not on the technical advantages of the two formats, but on the philosophical differences. The ODF may be free and open, but if Microsoft, the dominant office software writer chooses not to support it, then is it actually as useful as it first seems?
Is not being locked into a particular vendor worth not being able to email documents to other companies because they use MS Office?
These are the questions that should be asked.
(NB I have used the word "standard" indiscriminately, to mean both a specification ratified by an international body, as well as something that "everyone" uses)
(Disclaimer: I use a mac)
Sources: (1) http://www.naciente.com/essay94.htm (Abridged, to reduce length)
OneCare Live Beta
Thursday, December 01, 2005 3:14 AM
I've just recieved my oneCare live invitation. I've had to use a few 1337 h4x to make it install through the highly oppresive uni firewall, but all is proceeding smoothly. For now, a screen grab of the installer. I'm a little scared of the first bullet point in the popup. This machine is on it's last legs as it is, and this could tip it over if it all goes pear shaped. Next post may well be from my mac. Not that there is anything wrong with macs.
2 Blogs!
Monday, November 28, 2005 11:49 PM
Wow, 2 blogs. I struggle to update my other more than once a month, so how the hell I will manage 2 is anyones guess. Perhaps if I keep technical ramblings here, and the other as a personal blog... yes, that would work. Something technical then. I know, half finished projects. - Random password thing: 2%
- Evolution food/mineral/metal/land calculator: 10%
- Centurion: 100% last week, this week: ?%
(my favourite project, it's only a short PHP script but it keeps my other blog safe from evil spiders. And it was "finished" (no piece of software is ever finished, it just reaches a state of acceptable functionality), until the webhost changed something...) - A Grue-some tale: 5% (text adventure)
They are all being worked on somewhat, even if I just think about doing some work on them. My last 4 hours have been spent trying to get a linux distro to work on my iBook. Why? Because lectures have all but finished, and I was as bored as hell. So, I downloaded Fedora, wouldn't even boot the installer. My next attempt was ubuntu, which I had slightly more success with. Everything works, except if you close the lid it goes schizo, and the wireless doesn't work, which is a major failing because it means I can't IRC from my bed. All in all, a wasted evening. Time to make up for lost time. Now where did I leave that FF-XI install disk...
|
|
|
|
|
|
| | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| 30 | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 10 | 11 | 12 | 13 | | 14 | 15 | 16 | 17 | 18 | 19 | 20 | | 21 | 22 | 23 | 24 | 25 | 26 | 27 | | 28 | 29 | 30 | 31 | 1 | 2 | 3 | | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|
|
|
|
|
|
|
|
|