Expand Cut Tags

No cut tags

20 Years

Oct. 14th, 2016 07:35 pm
ggreig: (Dark Wizard)

Blocks signifying 20 years at InsightsOn the first of October, it was 20 years since I started work at Insights, and today I got my fourth block signifying a period of 5 years service.

When I started at Insights, I was the first developer through the door (I was joined by a colleague the next day) and the total number of direct employees of the business was smaller than the number of people in the department I’m in now. Now we’re a medium-sized international business, working with some very large businesses indeed, and all still heavily reliant on the software I’m involved in building.

Not counting founders (one of whom currently sits across the desk from me) there are a couple of people who’ve been with the business longer than me. In one case, 26 years! Still, 20 years seems like a long-ish time.

Yesterday I had lunch with other members of my team, and I have a couple of lunches with more senior people coming up in the next couple of months. I also have to decide what form I want to receive a gift in. (Thinks: I have a handy list of 28mm models I’d like…)

Whatever happens, what with having spent a relatively long time in further education, that’s more than half my working life spent at Insights – if I stay here until I retire, I’ll only earn another 3 blocks.

ggreig: (Dark Wizard)

Download Open Live WriterWhen I first started blogging, I used LiveJournal’s own facilities to edit my posts, but for many years now, I’ve used Windows Live Writer instead – a program created by Microsoft as part of their Live Essentials suite that just makes editing blog posts much easier, and allows me to save drafts offline before posting, as I tend to be a slow, careful writer. The single most useful thing it does is make posting pictures easy, but there are quite a number of things it just makes easier in greater or lesser ways.

However, it hasn’t been updated since 2012, when Microsoft indicated they weren’t going to develop it any further. That’s kind of OK – as a free app, it wasn’t directly making Microsoft any money so it’s difficult to complain if they decide it’s no longer worth it.

It was really disappointing, though, to think that some day I might not be able to use such a useful program because it just got left behind.

I wasn’t alone in thinking that, and people both inside and outside Microsoft campaigned to have it open-sourced, so that its development and maintenance could be picked up by enthusiasts.

Today Scott Hanselman announced that Live Writer has been open sourced, and you can download Open Live Writer immediately. It’s currently a little less capable than the old version, mainly because of third-party licensing reasons, but I expect replacement functionality will be on its way (some is definitely already planned), and that in time Open Live Writer will be an even better solution than Windows Live Writer has already been.

If you’re a blogger on Windows and don’t use it already, I’d recommend checking it out. If you’re already a Windows Live Writer user, it’s good to know there’s a new future for the application.

If you’re a developer and want to contribute, you can subscribe to the mailing list and explore it on GitHub. Scott Hanselman’s article is a good introduction.

Postscript: of course, having said that the single most useful thing it does is make posting pictures easy, Open Live Writer failed to do so for this post. Still, the original Windows Live Writer still works, I’ve filed a bug, and I’m sure it’ll get sorted out in due course.

Post-postscript: as a result of my bug report, it's already been found and fixed in development in a little over an hour, so shouldn't be too long before it's fixed in an actual release.

ggreig: (I Need Dis)

…that the World Wide Web entered the public domain. I’m pretty sure I first used it later that year when I returned to university in Dundee (along with ever-more-occasional Gopher use).

By the time I was looking for a job three years later, the Web was so much of a part of how I worked as a developer that I dreaded the possibility of working for a company that wasn’t connected. Luckily, that didn’t happen, although all we had was a 28k modem – with a timer on the power socket so that it cut off outside working hours and therefore kept the phone bills down.

ggreig: (Judge Greig)

There’s been quite a lot of attention paid to the new user interface in Windows 8, especially the Start Screen that’s replacing the Start menu, but perhaps if you’re a web developer you’ve been thinking none of this has much relevance for you.

Whether that’s actually right depends a bit on what sort of devices you’ve been targeting up until now.

The desktop environment you’re used to still exists in Windows 8 (more or less) but there’s also a new type of application called Metro-style Windows Store apps. By default, these run full screen, with much of the usual user interface hidden away so that, in the case of a web browser, almost all you see on screen is the page content.

Internet Explorer, if launched from the Start screen, will open as a Windows Store app by default, so you’ll start browsing full screen. Chrome, Firefox and Opera have each indicated that there’ll be a Windows Store versions of their browsers, so what follows will also apply to them.

Most commentary on Windows Store apps has tended to stop there, with the app running full screen, and gone on to talk about how you interact with it.

What hasn’t been commented on quite so much is what happens if you want to have more than one app on screen at once.

Although you can launch several apps and switch between them, the most you can display simultaneously is two apps side-by-side, as in the following picture, where you can see the BBC home page in Internet Explorer on the left, and a weather app “snapped” on the right, with the two separated by a black splitter bar:

IE in fill view on the left, and a weather app in snapped view on the right.

You can click through the screen shots to see them full size.

Internet Explorer on the left is basically the web content, with an address bar and a few other things visible at the bottom of the screen. The weather app on the right displays the current weather and forecast weather for the next few days vertically down the side of the page. Nothing too challenging about that so far.

The weather app is a native application – not a web page – and it’s displaying in the snapped view. Internet Explorer is now displaying in the fill view, rather than full screen, but there isn’t a big practical difference between the two. Snapped view is another story though.

A window in the snapped view is a fixed 320 pixels wide – no more, no less – and runs from the top of the screen to the bottom. It can be snapped to either the right of the screen or the left. It’s only available for screen resolutions above 1366x768 – if you have a lower resolution, running Windows Store apps full screen is your only option, with no way to display them side by side. Fill view fills everything except for that 320-pixel-wide strip.

All Windows Store apps are required to support the snapped view, and as you can see the weather app does so clearly enough. As this version of Internet Explorer is also a Windows Store app, it’s require to support snapped view too. Let’s see what happens if we move the splitter bar across to the left so that IE is in snapped view and the weather app is in fill view:

IE in snapped view on the left, and a weather app in fill view on the right.

Note that the weather app’s adjusted to make use of the space available to it (there are more interesting and practical examples of Windows Store apps, but I chose the weather app because the information in it’s innocuous). IE has also adapted; it’s now displaying the BBC home page 320 pixels wide.

If you’ve taken a responsive mobile-first approach to designing your site, using media queries, then your pages may appear OK. If you haven’t, you’ll get a 1024-pixel-wide rendering of your site scaled down to 320 pixels wide. Here’s how that BBC site looks, full size – not particularly usable:

BBC site at 320 pixels wide

Windows 8 is a game changer for web development, because it means that “mobile” design is no longer restricted to mobile devices. 320 pixels wide is narrower than many phones (though certainly not all – link via [livejournal.com profile] andrewducker). The Windows Store app version of IE is what your users will get by default when launching IE from the Start Screen, and even if there’s a push back against this, it can be guaranteed that some proportion of your audience will prefer to browse this way (and this will presumably become true for other browsers too in due course).

It’s true this’ll only be an issue when a Windows Store browser window’s snapped. Your users won’t be affected if the browser’s full screen, nor if it’s in fill view; and if they use the desktop version of the browser rather than the Windows Store version everything will be as it was in previous versions of Windows. Remember though that they may not think much of your site if it forces them into using their operating system in a particular way.

Think of it like this; if your site isn’t designed for mobile, you’re now accepting that some of the time it’s going to be unusable on Windows too.

Here’s some specific advice on how to start responding to this change (also pay attention to the helpful comment from Karl Dubost of Opera Software).

ggreig: (Default)

For a while when I was at school, some friends and I had a make-shift aerial runway in the woods above the village. There was a rope stretched across a burn from one tree to another, descending from the high bank on one side to a lower, flatter area on the other. We found a sturdy forked stick, put it over the rope so that we could grab one branch in either hand, and then flung ourselves off the higher bank and slid down the rope to the other side.

In the Scouts, we took aerial runways a bit more seriously, and A-frames and pulleys were involved.

An aerial runway can be a quick and efficient way to get fairly small numbers of people and things across an awkward waterway, especially if you’re going one way and your side is higher than the other. For some circumstances it will be absolutely the best way to get across that river.

If you start relying on a network of rope-slides to move your army around though, you’ll quickly find there are some drawbacks. Even though each crossing might be fast, getting off one rope-slide and onto the next one is not as convenient as it might be; the pulley has to be drawn back across before the next person can go; and if you want to cross the river repeatedly, in both directions, and maybe transporting more than the tensile strength of a rope will bear, it doesn’t take long before you start thinking in terms of building a bridge instead – quite possibly a seriously engineered bridge, with a proper road on top.

A quick fix in code is a bit like a rope-slide. It’s fast; it gets you from A to B; and it can even be quite exhilarating. Woohoo! I did it! Look at me, Ma! But maybe a network of rope-slides is not what your product needs.

It can be difficult to explain to non-developers the effect that applying a quick fix can have on the long term prospects of the code. If given the choice between a solution that’ll work now but cause problems in the long term, and one that will take a bit longer to deliver but save time in the future, the more far-sighted solution seldom gets a look in.

Maybe the rope-slide/bridge metaphor is a good way of explaining that decision. Yep, it’s OK to set up the odd aerial runway when the occasion demands it. But if you find yourself building nothing but rope-slides, something has gone far wrong. It might be worth keeping a comparative count of rope-slides and bridges just to check that you’re not trying to transport an entire army around on gravity, A-frames and pulleys.

ggreig: (Default)

Sometime this month, I think I passed the milestone of 20 years of owning a PC.

I wasn’t particularly exposed to computers while I was school, nor even much at university. A friend had a BBC micro, on which I played Elite a few times, and I learned to write S-algol on the University VAXen. The closest I came to a PC was one Physics lab that required me to write a little Basic to control a stepper motor.

Then I did a conversion M.Sc. to Computer Science, and then I was unemployed.

After nearly a year of unemployment, the bright future of work as a programmer I’d hoped for looked like as though it might be escaping from me.

I thought I’d better do something about it, and with a loan from my parents and advice from my friends I bought a PC, to demonstrate that I was serious about these computer things. In particular I was grateful for the advice of [livejournal.com profile] flybynightpress, a Mac enthusiast himself, who advised me not to get a Mac but a PC, because the employment prospects were better. You tend to pay attention to advice like that!

That PC was a Viglen (pre-Lord Sugar), with a 386DX processor, 4MB of RAM, and a 125MB hard drive, with the (then) brand new Windows 3.1.

Sometime in June or July, I had a horrible experience when it stopped working. Completely. My first computer, bought with money I didn’t have, bricked. and with that horrible paranoia that maybe, oh no, maybe it was all my fault!

A technician had to come the hundred and something miles from Edinburgh to the glen where I was living with my parents on the west coast, with me liable for the several-hundred-pound cost of the callout if it really was my fault. That was not a happy wait.

Luckily, the motherboard had died of its own volition, and with a replacement fitted free of charge, that PC served me well for a fair while afterward. And a month or two later, I was employed as a programmer, albeit in a job paying only 65% of the average graduate starting salary of the time, and with the most horrible computer language in the world ever. And on a PDP-11/83, not a PC. Still, I’m sure my PC-ownership helped ;-).

Today, my Raspberry Pi arrived, both more and less powerful than that machine of twenty years ago, depending on how you look at it. Unfortunately a painful ear infection is making the thought of tinkering unappealing for me tonight; but hopefully the Raspberry Pi will be the gateway for others to follow in the career that the PC has let me enjoy.


Apr. 1st, 2012 10:02 pm
ggreig: (Western gentleman)

An Arduino UNO and accessories

Back in 1990 I was relieved to graduate with a 2:2 in Physics and Electronics, and the knowledge that whatever I was going to do next, I didn’t want it to involve Physics. A conversion M.Sc. to Computer Science came along, and having enjoyed the logical parts of Electronics, it turned out I was able to make a go of computing.

I think that probably the last time I had anything much to do with hands-on electronics was back then, when I created a voice-delay board for my Honours project; a project that would store up to eight seconds of speech at 8-bit quality, before playing it back.

For the last year or so, I’ve been intrigued by the idea of the Arduino (or a clone such as the Netduino, which allows you to use the .NET Micro Framework), a microprocessor with an environment of plug-in accessories that’s intended to make it easier for people – especially artists and designers – to achieve interesting things with electronics.

For this week off, I dug out the gas soldering iron I’ve had pretty much unused for ages, ordered a bunch of interesting sounding parts and, driven by visions of having a robot zipping about the place autonomously and chatting to people, I set out to see what I could achieve.

To avoid disappointment straight away, you possibly won’t be astonished to hear that there’s nothing to show you!

However, I did have fun tinkering with electronics and simple programming.

What you see in the picture above is an Arduino Uno (top left) connected to my PC via a USB cable and sitting on a base that also holds a breadboard for experimentation. Surrounding it are three “shields” that can be stacked on top of it and controlled by it. Going clockwise, they are an Ardumoto shield for powering electrical motors, a Voice Box shield for synthesising speech, and an EasyVR shield for voice recognition. Also in shot, some tools including a Portasol Technic butane-powered soldering iron, and an SRF02 Ultrasonic range finder.

I’ve tinkered a bit with each of them – enough to be sure I can get them working – but spent most time on getting the Voice Box shield to talk. This required some soldering to attach the ”headers” (the black strips of connectors that allow the shield to be stacked on top of the Arduino) and a couple of screw connectors that speaker wires could be pushed into.

In the process I found that I could still solder stuff, but wasn’t very good. Also that the gas soldering iron wasn’t very good for recovering from bad soldering events, so it’s a good thing I was just a bit untidy and didn’t have any real disasters.

Programming the Arduino is done in a simplified version of C++, based on the Wiring platform, with some of the structure of your program pre-defined and hidden from you to make it easy to get started. It has its own IDE, originally developed for the Processing language. Arduino programs are called sketches, and they control the behaviour of the pins around the edge of the board, which you connect other components to (such as the shields, or standard electronic components).

Personally the first thing I did was look for a plugin that would allow me to work in Visual Studio rather than the Arduino IDE, and luckily there is one. Despite the claim that “serial tools are far better than Arduino”, I did find myself dropping back to the Arduino IDE on occasion for the tool that observes the serial output from the Arduino, as some of the output wasn’t appearing in the Visual Studio version, even though I knew it was there. Also some of the UI idioms it uses weren’t entirely at home in Visual Studio – adding a new Project from the Project menu, rather than the File menu for example. Apart from those quibbles though, the Visual Micro plugin gave me an environment I was happier working in.

The Voice Box shield turned out to be simple to program to. Using standard Arduino library functionality, you create a software serial port that will use two pins to talk directly to the SpeakJet chip on the Voice Box shield; then you send arrays of numerical commands to that serial port. That’s it, as far as technical stuff goes.

Where the work arises is in figuring out what those numerical commands should be. There are some general commands for such things as volume, speed, and pitch, and then more specific commands that represent phonemes that can be used to build up your speech.

There is a helpful program that will do some of this work for you, based on a dictionary of words that other people have already created. If the dictionary doesn’t contain the words you want, however, you’ll have to build them up one phoneme at a time. This applies to perfectly normal words that you’d expect everyone would want an electronic voice to say for them, such as “Exterminate!”, so get ready to spend some time looking up numerical codes for phonemes.

I spent less time with the EasyVR voice recognition shield, so don’t have a lot to say about it at the moment, except that it maintains tables of words it can recognise and the pre-defined words worked perfectly well for me. I haven’t yet investigated customising it, but working within the limitations of this and the Voice Box, I hope it’ll be possible to build up simple dialog trees.

I got the Ardumoto shield to drive the motors on a Dagu Magician chassis. They appear to be a bit weedy, so I don't think they're going to drive that Sevan's Dalek I have lying about, even though it looks like the Magician chassis would fit beneath the skirt, but it’s a start.

So if everything works, why haven’t I achieved more? Well, you may have guessed, but everything working fine separately is not the same as everything working in unison. Although there are quite a lot of pins controlled by the Arduino (6 analogue and 14 digital), inevitably some of the shields want to use the same pins for different purposes. The next step is to do something about this, to which end I’m looking at the Go Between shield from Mayhew Labs; and if in future I want to add many other components so that a robot can interact with the outside world, I will probably end up looking at a Mux Shield.

In future, I might like to play with a Netduino in order to get a nicer programming environment, but I started off with an Arduino because it’s more widely used and supported and I wasn’t going to be faced with the possibility of having to write my own support libraries for shields before I really knew what I was doing.

I’ve had a bit of fun, it’s not been too taxing of my electronics or programming skills, and it looks like more interesting things could be fairly easily achievable.

ggreig: (Default)

There’s a partially justified tendency among software developers to say “Eeeewwww!” when the subject of Hungarian notation – a naming scheme for variables – comes up. It’s fair to say it has a bad name. I don’t like it either, in its most common form; but I said “partially justified” because it isn’t a simple open and shut case.

What people tend to think of as Hungarian when deriding it is Systems Hungarian; where variable names are prefixed with something identifying the type of the variable. This is how you wind up with identifiers like szName or even lpszName, where that indicates a long pointer to a zero-terminated string (piece of text) containing a name. As you can imagine, code with a lot of that sort of stuff in it can become a bit tricky to read. When the variable names are dancing before your ideas, you know it’s time to take a break. Let’s not get into what long pointers are, and use szName for our examples from here on.

It’s also a bit fragile, because if you change the underlying type (say from an int to a double, when you realise that you need to store a real number rather than an integer) and you forget to change the variable name at the same time, then your “self-documenting” code is suddenly no longer quite as helpful as it was.

The Systems Hungarian style was used by the Microsoft Windows development team, and will be recognised by anyone who’s had to deal with the Windows API.

That’s not where Hungarian notation began though. It was originally proposed while working at Xerox PARC by Charles Simonyi,  who was born Simonyi Károly in Hungary (Hungarian surnames come before given names). Simonyi later moved to Microsoft, where he became Chief Architect. You can read the content of the original, fairly short proposal in the MSDN library.

Simonyi’s version of Hungarian notation, which was used by Microsoft’s applications division, later became known as Applications Hungarian to differentiate it from the Systems Hungarian developed by the Windows development team.

Applications Hungarian takes a slightly different approach to choosing those prefixes. In Applications Hungarian, the prefix is meant to encapsulate some semantic information about the variable – it’s meant to give some idea what the purpose of the variable is, rather than exactly what type it is. For example, Applications Hungarian would prefer strName to szName, because all you need to know for most purposes is that the name is a string rather than needing to know exactly what type of string it is (many different implementations of strings exist for C/C++).

This emphasis on semantics helps to convey more information the variable and how it is expected to be used than just its type. Another example from would usName: the us prefix indicates that the variable is an unsafe string (probably user input) and that it needs to be checked carefully before it’s used.

Applications Hungarian is also a bit less fragile than Systems Hungarian, because the information its prefixes contain is less likely to be invalidated by changing the underlying type of the information. To use the name example, you could switch to a different string implementation, but you would still have a string containing a Name.

However, both Systems Hungarian and Application Hungarian share the flaw that they can be a bit cryptic and difficult to read, especially with a proliferation of prefixes. Both have fallen out of favour for this reason, and even Microsoft recommend against use of Hungarian notation when coding against the .NET framework which has been introduced since 2001.

When Insights moved from C++ to .NET development in C# in 2005, we wanted to come up with a naming convention that would comply with Microsoft’s recommendations, but also contribute to the expressiveness of our code. What we came up with was what I’ve decided to call Anthropomorphic Hungarian.

Microsoft’s recommendations for naming variables and parameters – which you can read in more detail if you wish – at their simplest boil down to:

  1. Use Camel Casing
  2. Don’t use Hungarian notation

Strictly speaking, Camel Casing here means lowerCamelCase, in which the the first letter in the first word of a compound variable name isn’t capitalised. Its sibling, UpperCamelCase, in which the first letter in the first word is capitalised, is used for other purposes and is referred to as Pascal Case. We’re not discussing the situations where Pascal Case should apply.

Although Hungarian notation is fairly unequivocally deprecated, lowerCamelCase has a couple of significant drawbacks. It tends to de-emphasise the first word. Using the example of lowerCamelCase itself, this is unhelpful because “lower” is actually the most significant word in the name; the one which differentiates lower camel case from upper camel case. Also, what happens when your variable name is a single word and not a compound word? The resulting variable name entirely in lower case looks a bit incongruous and out of place. Small speed bumps like this can have a surprising effect on the readability of code.

Anthropomorphic Hungarian aims to satisfy the Microsoft guidelines, provide some semantic information about variables, and improve the readability of the code.

To do this, Anthropomorphic Hungarian follows these principles:

  1. It uses a very small set of approved prefixes. One of the things that can go wrong with semantic prefix schemes is that the number of prefixes expands to cover more and more unforeseen types of information, and ultimately the scheme conveys less information as the list of prefixes becomes too difficult to stay on top of.
  2. Although not quite all Anthropomorphic Hungarian prefixes are made up of English words, English words are strongly preferred; sometimes the sort of words you might use if you were trying to explain the code in speech. This increases the readability of the code.
  3. The prefixes should encourage developers to make the rest of the name useful, by starting with English words that can lead into something more expressive.
  4. The prefixes must be short. They should add meaning and ease of reading to the code without being too onerous to type, or taking up too much space.
  5. The prefixes must not contain primary information about the purpose of the variable; they’re a way of recording a small of amount of useful, but secondary, metadata. As a result, it doesn’t matter that lowerCamelCase tends to de-emphasise the prefix.
  6. The prefixes are largely, though not exclusively, concerned with scope – where the variable is declared and therefore where it can be used. This is a usage of the older forms of Hungarian that developers are notably reluctant to give up with regards to prefixes for class member variables, and it is also useful in other circumstances.
  7. Classes and interfaces are anthropomorphised. This is the most distinctive feature of Anthropomorphic Hungarian, and the source of the name.

Without further ado, here are Anthropomorphic Hungarian prefixes as used at Insights. As you’ll see, most prefixes are only two or three characters, with a rare maximum of four:

Anthropomorphic Hungarian Prefixes
Prefix Meaning
the A local variable within a method.
in A parameter that is only passed into the method.
my A member variable of a class. It’s “my” variable from the point of view of the anthropomorphised class.
a/an A member of a collection or a loop control variable (often these are one and the same thing).
ui/ux A member variable of a class that represents a user interface control. We agreed on ui, my personal preference is ux. This is an example where the prefix is not an English word.
ICan Not for a variable in this case. There are two possible descriptions of the service that an interface provides to a class that implements it. This one, which is usually preferable, is for an interface that provides a particular behaviour.
IAmA/IAmAn Sometimes an interface is defined in such a way that it’s more like a base class than a description of a service. This prefix will be more appropriate for those cases.

The prefixes for interfaces meet the Microsoft recommendation that the names of interfaces should begin with “I”, but encourage more expressive interface names. When a class implements an interface or interfaces, the interface names in its declaration form a positive statement in English on the part of the anthropomorphised class as to what contracts it satisfies.

Here are a few prefixes that were also agreed at some point, but are seldom or never used:

Seldom Used Prefixes
Prefix Meaning
is A Boolean value, with the main part of the name expressing the true condition.
loop This prefix was agreed for loop control variables, but in practice a/an has almost always been preferable.
out This prefix was agreed for reference parameters which are only used to pass information out of the method.
io This prefix was agreed for reference parameters which are used to pass information both in and out of the method.

Much of this isn’t original. “a” has appeared as a popular prefix in SmallTalk for many years, for example, and my thanks to [livejournal.com profile] tobyaw and [livejournal.com profile] qidane for introducing me to "the"; but I think that pulling all these together into a fairly tight little convention is novel, and has proven quite successful. It’s not always immediately popular with new developers, but it seems to be something people come round to with a little experience of it.

ggreig: (Technical Support)
Here's something for iPhone users with Windows Phone envy: why not run Windows Phone on your iPhone?

It's actually a browser-based demo of the UI, so it's not exactly "real", but it's a neat idea for giving people something they can try hands-on. (If it works - someone here tried it with an iPod and got the same message I did on a desktop machine - "your device or web browser isn't supported at this time".)
ggreig: (Default)

Redgate are running a competition in which the main prize is for a lucky DBA to go into space. There are five days left to enter.

Fearing that developers might feel left out, they’re now running a competition for them too.

Most Wanted

Nov. 1st, 2011 10:39 pm
ggreig: (Default)
Meant to post this nearly a month ago, but it's still interesting. What kind of tablet do people really, really want to have? An Android device? No, surely it's got to be an iPad? Read on...
ggreig: (Vacant Podling)

It’s possible to do some cool things with JavaScript, but fundamentally the whole language is still an evil hack that we’re stuck with because it’s widespread, requiring clever hacks like jQuery to hide some of the unpleasantness. A prime example of hackishness – which will no doubt be fixed once they realise just how foolish it is – has  appeared on the pages of the Herald.

Premium content on heraldscotland is now only available to registered users.” Yes, indeedy, it’s true – sort of. If you visit a “premium” page full of prime journalistic content, like the letters page for example, you’ll see the whole article at first, but before you’ve finished reading it, all but the first paragraph or so will disappear.

…hang on a minute…

So, the whole page is already loaded in your browser, but you can only see part of it? View source…

Yep, the whole thing is still there, there hasn’t been a page reload or anything, it’s just been collapsed down using JavaScript. This is a form of security through obscurity (relying on the user not knowing how to sidestep it), which is a notoriously weak approach to protection.

So far, so daft. But the bit that prompted me to write was this. At the end of the “real” content of the page, there’s a noscript tag (intended for the attention of people browsing without JavaScript, the only people who’ll be able to read the entire page without hassle). It says:

You need Javascript enabled in your browser in order to view this page.

ggreig: (Default)

Just been given two of our inaugural long service rewards; due another one next year…

Two solid metal bricks, representing 5 and 10 years of employment at Insights

The longest serving current employee’s 18 years, 4 years ahead of me.

ggreig: (Astronaut)

I finally have a fully operational Windows Phone, following its arrival on Friday. The delay is not the fault of the phone, I hasten to say, it's due to unfortunate timing and mistakes made by the provider. I won't dwell on those.

Windows Phone 7The Windows Phone is supposed to have a pretty standard user experience regardless of whose hardware you've acquired, but in case you're interested what I'm typing in to at the moment is an HTC 7 Trophy, with 8GB of RAM. Memory is one of the key distinguishing factors between the phones on the market, although there are others. For work it was more important to get a phone promptly than get a memory monster, so we passed up the chance to wait for an LG Optimus 7 with 16GB. The HTC phone is physically prettier, quite like an iPhone.

Sitting on a bus bombing through the Fife countryside as I am, the feature I'm most conscious of is the onscreen keyboard, the only means of text input. I've heard it compares well with the iPhone, and a juddery bus is a pretty fierce test, but I do feel fat fingered even when not stretching its capabilities. What I really want right now is a stylus (which is easier to steer with the point held on the page than stabbing at keys that respond when you get near them), and what I want in a more stable environment is a Bluetooth keyboard; unfortunately neither are supported, as I discovered when I tried with my old keyboard.

It's true I'm not a typical user. I have a dumb phone myself, and wouldn't have that if I hadn't been given it. What I want is a PDA, but since most/all PDAs are phones these days, I'd better get used to it! ;-)

There's a lot to like, though. The touch is nice and responsive, and it will be interesting to see how the marketplace develops. Office is a handy thing to have a mobile version of, and at no extra cost (unlike the extra software I had to invest in for my Palms). Although I'm not really a gamer, the Xbox Live integration is a nice touch.

Standard stuff like mail was fairly easy to set up, apart from connecting to Exchange through Outlook Web Access secured by a self-signed certificate. The only way to get the root certificate onto the machine is to set up some other e-mail account on the device, mail the certificate to yourself, and install it from the e-mail message . Personally I'm a fan of paying for certificates for applications like this, but grrr! That was annoying. Once set up, each e-mail account has its own tile on the start screen, and they are accessed separately.

I wasn't quite expecting that, because other updates from the Internet are all collected into one place, under the People tile. Well, the ones that are supported, anyway - Windows Live and Facebook. If you use some other social media, like LiveJournal or Twitter you're out of luck - for now at least - and will need to use the browser or a dedicated app. I understand why it's not possible to support all the many and varied options out there, but not sure why something that's basically a social newsreader can't accept an RSS feed...

Browsing the Internet is quite cool (dumb phone owner, remember!), and the pinch zoom does make it possible to browse pages that would otherwise be a non-starter. Kudos to Apple for leading the way on that one - but having used it in anger, it's now quite clear that it's a sticking plaster. If you're developing a web site, and you want people to access it from mobile devices, do them a favour and design for mobile: don't just trust the browser to take care of it for you. It may work, but it'll be needlessly painful.

Bing maps with the built-in GPS are quite fun - not sure there's much to add to that, but there you go.

I guess the key question has to be, would I get one with my own money? Well, I've been waiting a long time for a device that I would be satisfied with as a worthwhile upgrade from my venerable Palm Vx. I've always said it has to be a convergence device, at least to the extent that it will replace not one, but two of the devices I carry around with me. The Windows Phone doesn't quite do everything my Palm can; most notably it's missing a database solution like HanDBase, though that's surely just a matter of time. It's the first time, though, that I've played with a device where I think "This might be the one". It's got decent potential as a PDA; it's a phone; it's got a camera that's comparable to the one I was using up until last year; it doesn't have the capacity to carry my music collection, but then neither does anything else except the high end iPods; finally, it's actually pleasurable to use.

Rather a powerful point in its favour is that it's part of the Microsoft ecosystem and will work with my other devices with a minimum of hassle; and I have the option of developing for it without having to buy a Mac, although I'm a bit disappointed it would cost me $99 p.a. just to be able install an app directly onto my own machine. Admittedly, that would also allow me to distribute it through the Marketplace, and earn megabucks (ahem), and do likewise for the Xbox, but still.

So the answer is maybe, but a more definite maybe than any previous device. May be interesting to see what emerges over the next few months.


Sep. 14th, 2010 08:38 pm
ggreig: (Blockhead)

I got back to Scotland from a holiday in California visiting [livejournal.com profile] msinvisfem last week. I saw a lot of interesting stuff, so there’s a lot to write about, but based on previous experience – and about 12GB of photos and videos to sort through – it may be a while before it hits the blog here.

Outside the Microsoft Store, Mission Viejo, CAIn the meantime there’s one thing it’s quite easy to write about quickly, so I’ll start with my trip to one of the first Microsoft Stores, at Mission Viejo. There are currently only four physical Microsoft Stores, all in the States, so while the chances of me buying something off the shelf were pretty slim, it was an interesting opportunity to visit and see what there was to see.

The store bears a distinct resemblance to an Apple Store, though a bit more warm and welcoming with varnished wood in place of the sterile lab look. The staff seemed interested and helpful, although being British and just there for a look, I was mostly more keen to dodge them than interact. The hardware was nice to look at, but difficult to arouse much enthusiasm for when I’m not in the market at the moment, either personally or at work, having just got a touchscreen laptop at the start of the summer.

There was one young guy I spent some time chatting to though, who was demoing something I was surprised and pleased to see: Kinect for Xbox 360. If you haven’t hear about it already, it’s due out in a couple of months and it’s a way to interact with the Xbox 360 without a hand-held controller. That’s a big deal for the Xbox, which will help it catch up with other less sedentary game machines such as the Wii, but it’s also a big deal full stop if it’s actually good; bringing sophisticated real-time computer vision into peoples’ homes (also voice control and facial recognition, though those have appeared in home devices such as phones and cameras before). That’s impressive, and – assuming it’s successful – not so much catching up as leap-frogging other consoles.

It’s an impressive technical achievement, but is it really much different in terms of play from a hand-held controller? I’m not really in a position to say definitively, but the difference is that it’s (quote) “full body play” (promotional video). You only need one controller sat in front of the TV screen, and it will track not just the position of your hands or your feet, but can follow facial expressions too. Judging by the promotional video, it can handle two players at once. I don’t know whether more are possible.

I had a quick shot at a ten-pin bowling game:

Ten-pin bowling with Kinect for XBox 360

First of all, you get the machine to recognise you by positioning yourself on a red spot that appears on the “floor” on the TV screen. I had to shuffle backwards slightly to get “myself” on the spot. Once that was done, all I had to do was reach out my arm to the right to pick up a ball; and do what came naturally to bowl it.

I bowled six frames, and had no difficulty picking it up. In fact, in common with my similarly limited experience of bowling with the Wii, it might be a bit too easy; within that six frames I managed to bowl a turkey, which I’ve never heard of before and certainly never achieved in real life. However, it seems there may be room for greater finesse; the demo guy said that once you’ve practiced a bit with it you can apply spin – and all without a hand-held controller!

Six frames of bowling isn’t enough to give a comprehensive overview of Kinect, but it was fun and natural, and I’m quite excited about this development – both as an Xbox peripheral and as a significant achievement for applied computing in the home.

ggreig: (Steam Coach)

If you’ve ever wondered what PHP stood for, wonder no more. Read “A Brief, Incomplete, and Mostly Wrong History of Programming Languages” to discover the origins of  Programmable Hyperlinked Pasta among other well known historical programming languages. Kudos to the commenter who points out that Jacquard’s looms were in fact multi-threaded.

En Route

Apr. 18th, 2010 02:24 pm
ggreig: (Topper)

For one reason or another I've never really had the opportunity to use a laptop while actually in transit, so I thought I'd take the chance to post while I can.

I'm travelling back North from London on an East Coast train and I have a seat with a power socket (essential until I bother getting a replacement battery). We're not long past Darlington. The handwriting recognition is holding up fairly well although the way the train is shoogling about doesn't help.

I've just spent the week staying with [livejournal.com profile] scottymcleod and Jan, and attending Microsoft's UK TechDays to coincide with the release of Visual Studio 2010. The value of the talks varied from OK but uninspiring, to "Ooh, must download that and try it out!" In the latter category, I look forward to being able to have some automatic checking of architecture dependencies and exploring programming for the Windows Phone.

It was good to see [livejournal.com profile] scottymcleod and Jan again, and also to have the opportunity to meet [livejournal.com profile] huskyteer for the first time. Posting as we pull into Newcastle...

Code Rocket

Feb. 3rd, 2010 12:52 am
ggreig: (Astronaut)

I heard today – slightly belatedly, due to some rogue spam filtering – that Code Rocket for Visual Studio has been released (currently works for C++ or C# – no VB).

It’s a Dundee-developed product (by Rapid Quality Systems, a spin-off from the University of Dundee’s Space Technology Centre), and I was lucky enough to get involved in the beta-testing period.

5... 4... 3... 2... 1... Lift off! )
ggreig: (Robot Maria)

You can skip this if you’re not involved in some form of software development.

I do some sort of software development )


Sep. 28th, 2009 12:47 pm
ggreig: (Vacant Podling)

The cougar that’s been sighted on the Microsoft campus has a Twitter account: @microsoftcougar. Not worth following, but amusing for a quick look.

June 2017

45 678910

Most Popular Tags


RSS Atom

Style Credit

Page generated Oct. 22nd, 2017 02:44 am
Powered by Dreamwidth Studios