Categories

Meta

Michael's Web Blog

This is my Web Blog, which is a weblog about the web. I talk about XHTML, CSS, scripting, web technologies, and a host of other topics. If you use the options panel, you can visit pages about my writing or programming.

August 2nd, 2013

I was catching up on Penny Arcade today, and Gabe was talking about his Microsoft Surface Pro. I like reading these, because only people who have one truly know what the device is like. I love mine, and it seems everyone who has one loves it.

Right at the end, he mentioned how he wished he could map some functions to the volume keys when drawing. This made me giddy, because I could help! I’ve spent full days programming AutoHotKey for use on my Surface Pro in various circumstances, so I could talk at length about the subject.

The regular stuff is easy, so I won’t spend much time talking about that. The hard stuff is platform-specific quirks, and how buttons on specific devices work. So here’s a list of things to keep in mind when programming AutoHotKey on Surface Pro.

Surface Pro has a one-piece volume rocker flimsy enough that you can press both buttons at once, a power button, a capacitive Start button, and a capacitive touch-screen. Microsoft got around some limitations by including their own hotkeys and implementing some good touch events.

You can capture any one key plus modifiers (Ctrl, Alt, Shift, Win) in AutoHotKey, and then send some other events when those buttons are pressed. You can also specify one button and another button, which turns the first one into a modifier. After that, holding the first button down won’t do anything until you press another key or release the first one.
So if you did something like this:
SC12E:: SendEvent ^{z}
An ‘undo’ command would be sent again and again while you held volume-down, as if you were holding Ctrl and Z on your keyboard.
But if you then did this:
SC12E & SC130:: SendEvent ^{l}
The volume-down button would only work when you released it, so you’d have to click-click-click-click-click to undo several steps.
There are workarounds, but keep that in mind.

24 possibilities. 15 Good ones.
(You don’t want to put LButton or RButton first, or your taps won’t do anything. Also, the Ctrl+Alt+Del combo sends that even when you change it, so you’ll always be confronted with the annoying option screen.)

Note that the Start button cannot be held down. It only activates when you release it, ignores touches it thinks you made by mistake, and only activates once every half-second with repeated taps.

Obviously, using LButton & Something else means your clicks are going to be intercepted and you won’t be able to click on anything. Likewise with RButton, but in something like Chrome that’s already disabled.

Even if you keep things simple, you can get several handy shortcuts by using AutoHotKey. It’s pretty nice! If you’re struggling to remember all those volume combos, I think of Volume Down + Volume Up as an uppercut, and Volume Up + Volume Down as a drop-kick. You start in one direction, but end up in the other.

Here are a couple lines of code for things I did to fix a couple things I changed:

; ‘IfWinActive’ matches based on keywords anywhere in title
SetTitleMatchMode 2

; By pressing Alt and the volume key, it acts normally (note you need the ‘virtual key’ code as well as the scan codes)
!SC12E:: SendEvent {VKAESC12E}
!SC130:: SendEvent {VKAFSC130}

; Just making sure that I can swipe open the charm bar anytime I want to change the volume.
#IfWinActive Charm Bar
SC12E::SendEvent {VKAESC12E}
SC130::SendEvent {VKAFSC130}

July 1st, 2013

Having upgraded to a Samsung Galaxy Note II in December, I noticed a few things right away. Any upgrade is going to be felt through the changes from your old system, and these are the differences from my drowned-and-rescued hand-me-down Samsung Galaxy S Captivate:
-This is a lot faster at basically everything, and fixes all the performance issues.
-No Fingerprints! The screen is treated with an oleophobic coating, which may or may not have existed on the Captivate (it could have worn off over time).
-Using the S-Pen, I can draw whenever I like. I’ve taken up playing Draw Something with my family.
-The screen area is much-improved. I can fit more icons or text on-screen, and the screen has more detail. It’s a big upgrade.
-This is running Android 4.1.1, which adds quite a few things Gingerbread didn’t have. Going back for a while was difficult, because I couldn’t do some of the things I’ve come to rely on.
-The phone itself is new and unbroken. My Captivate was given to me as garbage after it fell in calcium-rich well water, and I spent days with vinegar, Q-Tips, distilled water, and a syringe to get it booting properly. The charging port still only works with certain micro-USB cables, and until I found one that worked I was actually strapping the battery to a dismantled Samsung Hype feature phone to charge.
-The battery life is great. I don’t know what it was about the Captivate, but turning it on at all would drain the battery. I had to be careful to make sure all apps and wi-fi were off, or it would only last a few hours instead of all day. The Note II lasts up to five days, and can even get a full day with heavy usage.
-The size difference is interesting. It’s wider and taller than the Captivate (and the pouch I kept it in), and because I got the flip cover I don’t need to keep it in anything, so it’s pretty thin. It actually ends up fitting better, because there isn’t as much thickness.

The flip cover is really neat. Just closing it lets me hold the phone by putting my fingers all over where the screen would be, which completely changed the feel compared to delicately grasping the edges. Given most designers’ penchant for rounded edges, I’m thankful I don’t have to struggle too much with holding the edges of mine.
The flip cover is pretty expensive, from $30-$40, considering it’s just a few layers of stuff. I guess it’s also the back and an NFC circuit, so that kind of justifies things.
The build quality is actually really good. I expected something that would bend or fall apart within a month, and when my fingers mushed off the thin part between the earpiece cutout and the edge, I wasn’t surprised. But then that piece re-adhered itself, and you can’t tell there’s any sort of damage.
The rubber edging came off pretty quickly, so the edges of the outer textured plastic and the inner soft material open to show the yellowish material that forms the main structural sheet between those two layers. That glue shows no signs of letting go, though.
There’s no such strip in the part that makes up the spine in the cover, so all that’s holding the cover onto the device’s plastic backing is the dual layer of outer plastic and inner felt. Despite that, there’s been no warping and the cover still sits perfectly atop the screen. Despite being used outdoors in winter, there’s no cracking in the spine. In general, this is a relatively-cheap item that is made to absorb the brunt of wear, and it’s holding up really well.

The camera is really terrible. After five years of ever-improving cell-phone cameras, I expected something on par with the pictures my seven-year-old point-and-shoot camera would take. As it stands, I think we’re a little ways away from that. Maybe the more advanced systems, like the sensor in the HTC One, or the optics in the iPhone 5.
I’m seriously sad about this camera, though, because I had high hopes and I’m just kind of embarrassed to take photos with this one. At the very least, I’d like to take out all the post-processing, like the sharpening filters and such. If I wanted to do that, I’d do it myself in an editing program.

The Note II looks really nice. It doesn’t have quite the character of the Galaxy S III, but it uses the same design language. The tapering at the edges of the glass face on the white face make it look like glossy candy. I love the single button with the soft-buttons beside it. I got the white one, and I looked at the blue one, but that slate background just doesn’t work with the glossy glassy feel. It makes it look like it’s wrapped in a layer of plastic. Funny how design works.

The battery is really big, and so it lasts for quite a while if you’re not using it. When you’re using it, though, the screen and processor take up enough extra power that you don’t get any boost in active use compared to other phones.

The Note II comes with a stylus (the S-Pen), which is a Wacom passive pen that works with any Penabled device (at least, so far that I’ve tested). This allows synergy with other Wacom devices: Microsoft’s Surface Pro doesn’t have a place to keep its pen, so I actually just use the one from my Note II.
Android is a fairly wide OS, with support for extra features being added by OEMs and not being supported by most developers, so something like pen input is only really useful in certain apps. Even a keyboard and mouse only get you so far in Android, it seems. I’d like to see more apps integrating Air View (like, say, the browser? I’d like to be able to hover over links). Sketchbook Mobile works really well, though. I can disable fingers and just use the pen, then use my fingers to move the canvas.

Since we’re getting into software, I should mention the power button. The button itself isn’t really bad (though they still insist on putting it directly opposite of the volume buttons, so it’s hard to press one without pressing the other). When you hold the button for a second or two, a menu pops up with some options for sound, airplane mode or turning off the device. If that’s all it did, that would be fine, but holding the button longer will reset the device. Because of the button’s position and prominence, it’ll constantly be pressed while in your pocket. Every once in a while, I’ll hear the familiar start-up sound. Obviously, I can’t take calls during this. I’ve had thoughts of gouging out the button or using some kind of resin to build up a solid dam around it so that it can’t be pressed accidentally.
This could be fixed by firmware, though. There’s no need for a hard reset, because the battery is removable.

Android itself
————–
Past the phone, we get Android itself. It’s a pretty decent operating system, these days, but there are a couple annoyances:
-The battery level indicator isn’t very accurate. When it shows 60% battery I’ll have between 40% and 50%.
-There’s one main marketplace you search for all your apps, and each app is pretty crappy. I’d like more opportunity to try the good apps, and to pay for them if I like them.
-It crashes quite a bit, really.
-It doesn’t seem to have a high-level API that supports basic things like text selection or keyboard shortcuts. This means that people are implementing their own conflicting styles, and apps won’t have keyboard shortcuts unless the developers program them in. Even things like text selection (Ctrl+A) or copy and paste (Ctrl+ X or C or V) or undo (Ctrl+Z) are missing from many apps. We need properly-designed Google apps for things like filesystem browsing or managing services. It seems like the basic OS apps just don’t cut it right now.

I’m not sure if this is Android or my provider, but the mobile internet seems dodgy. Things will fail to load when I have full bars, or switching wi-fi off will cause my connections to close without even trying to connect. When my computer is connected via wi-fi hotspot, the internet connectivity on my phone sometimes stops working entirely until I sit in airplane mode for a bit.
I’d like to be able to rely on it if I need access to a scrap of information quickly.

All that said, there are a couple things I would have wished for:
-Better speakers. Something on the front or the side would be best, I think, because there’s no reason to have something on the back where you can’t hear it.
-Squarer edging. The sides of the device are curved toward the back, so it’s hard to grip. If you’re trying to grip the sides a bit lower to let the flip cover flip open, it’ll slip from your grasp. I’d like something that flares out just a bit before curving to the back.
-MicroHDMI port. I can buy a dongle that attaches through the micro-USB port at the bottom, but that requires me to buy something extra (on a device that’s already $700).
-Text reminders. I can set an option that pretends I get a new text message every ten minutes, but then I think I’m getting a new text message every ten minutes. There’s also an option that causes the device to emit a tiny buzz if you have a text when you pick it up, but that’s not quite enough. I’d like an option to just give a small vibration every minute or two, so that I’ll feel it when I sit still for a moment.
-Detachable flip cover? The flip cover is great except for the edge-case where I’m trying to use the camera. If I fold it back, it blocks the camera. I have to let it dangle as I’m shooting, but if I lean forward for a macro shot it might get in the way. This is one of those problems where it’ll probably be easier for me to just deal with it.
-Screen brightness? I’d like it if it could go darker, especially in automatic. These are OLEDs, so they’d be more efficient driven at lower powers. I’ve never understood why we can’t lower the brightness further than we can (unless they’re scared some users would do that in bright sunlight and be unable to see well enough to increase their brightness).

April 24th, 2013

I’ve reviewed Microsoft’s Surface Pro and how I feel about Windows 8, the Surface Pro hardware, and the type cover. I bought it for laptop use, and so I never much used it as a tablet. It’s been a couple months, and so I’ve gotten enough experience to discuss how I use it without the keyboard.

Windows 8 and the RT environment is designed around touch, so everything in that part of Windows 8 works without a hitch when it comes to tablet use. This is a full Windows device, though, and so I wanted to touch (ha!) on the things I do when I’m on the desktop.

I rarely have a problem with media. VLC uses a double-tap on the picture to go full-screen, and they’ve got a touchable volume dial and seeker.

I’m the type of person who’ll open a bunch of tabs in my browser and switch between them. Sometimes I need to close them, and sometimes I want to go back to a previous one, and sometimes I want to skip the current one to go to the next. On a keyboard, you can press Ctrl+Tab (or Shift+Ctrl+Tab for reverse) to cycle through open tabs, and Alt+Tab (or Shift+Alt+Tab for reverse) to cycle through open programs. Obviously, this is a bit difficult when there’s no keyboard, and so I rely on having my taskbar visible and having tabs easily clickable in my programs.

I often view my browser in full-screen mode, to get the most out of my screen area. As dense as this screen is, it’s still only 10.5 inches diagonally, so I usually increase the size of the text to fit the full size of the window. In a good browser, I’d be able to pinch and zoom, but in Chrome that doesn’t seem to be an option. I’m honestly thinking of changing, but until then I need to use the Ctrl key with either – or + to decrease or increase the size of my pages.
I also need the F11 key to pop out of full-screen mode, unless I want to fiddle with the edge of the screen to end it or swipe-tap-tap-tap-wait-tap-tap to call the keyboard and press F11. I’d like to be in full-screen mode to browse, but there’s no way to switch between tabs easily.

So now, the fixes!
I wrote earlier about using a program called SharpKeys to change some scan codes and remap my keyboard, but there were things I couldn’t do. I just installed AutoHotkey, which allows me to work with keyboard shortcuts of up to two keys or one key and any modifiers.
Also, as it turns out, I don’t really use SharpKeys anymore. Microsoft rolled out an update to fix all the function keys, and so now they work on their own.

I found out that the charms keys—search, share, devices, and settings—were Alt+Win+F21, Ctrl+Win+F21, Shift+Win+F21, and Win+F21, respectively. (Yeah, I know, F21?) I had remapped those keyboard combos to F5-F8, but I don’t need to anymore. Still, the more you know.

As I was trying to get F1-F4 back, which are media keys, I found something really interesting: the volume rocker on the tablet itself uses the same scancodes as the volume-up and volume-down buttons on my keyboard, and I could remap them. Then I had a flash of brilliance and realized I could map the Volume-up + Volume-down and Volume-down + Volume-up combos, as well as combinations of either volume button and the windows button, either direction. I essentially have eight possible combinations.

For the ease of use, I mapped Volume-up to Ctrl+Tab and Volume-down to Shift+Ctrl+Tab, so I can use that to quickly browse through tabs or open documents.
Pressing Volume-down and then Volume-up refreshes my current page, and Volume-up then Volume-down closes the tab I’m on.
The tablet’s Start button takes me in or out of full-screen mode.
Using the Start button with the volume rocker can be annoying, so I’ve mapped them to less-used functions; namely, zooming the page in or out.
I did some stuff with the volume buttons + Left-click, so I could hover over links or right-click easily (it’s really annoying to do on Chrome).

I can make several scripts to load for different purposes, so I could have one specifically for photo editing, or one for text-editing. I could probably even add some functions for certain games, so I can play them without the keyboard.

February 22nd, 2013

I recently got the Microsoft Surface Pro (64 GB), and I’ve been using it heavily for the last couple weeks. Here are my thoughts on Windows 8, the Surface Pro hardware, and the accompanying Type Cover.

Windows 8

You’ll hear a bunch of people deriding Windows 8 because it’s cool to do so, or because they’re using a desktop system (more the latter than the former, hopefully). I can see how the new start menu would be really weird without a touch interface, but if you have that then it’s nice.

I came from a netbook, so I have no idea if what I’m experiencing is an improvement in hardware or the operating system (or both), but everything is amazingly fluid. I catch myself in a moment of mild disappointment each time I see dropped frames or a second of stutteryness, because the rest of the time it’s nearly flawless.

As for change: What you think of the new system depends on how you used the old one. When I hit my Windows key (and I’d rarely use the button with my mouse), it was for a few reasons:

-I’m browsing full-screen, and I want to see the taskbar to check my battery level or the time

-I want to get back to the desktop

-I want to open another app.

-I want to open My Computer or a Documents file

What I’ve done is put my pinned apps at the beginning of the new Start screen, which takes care of the third and fourth item.
The only reason the other two apply to me is that I’m a heavy keyboard user, so I don’t just have a bunch of windows everywhere. I sort my screen into sections, and I’ve got a program which will resize any window to fit into one of those sections (sometimes with disastrous results), and if I can’t see the desktop I’ll just look for some kind of commmand.
I found that command in the form of some new Windows 8 combos. Pressing Win+D returns you to the desktop. Win+T takes you to the taskbar, and Win+B takes you to the notification area. Win+X opens a menu with a bunch of options for administering your computer, Win+C is the charms, while Win+I goes right to the Settings charm. Win+Q searches apps, Win+W searches settings, and Win+F searches files. Win+E opens a new Explorer window, and Win+O toggles orientation lock. Nice.

The options are a bit sparse. For example, opening a program from the Start menu used to open a new instance of that program. Now it looks to see if the program is already open and takes you there. You can right-click or use the app-menu button to choose to “Open New Window”, though. I’d like to be able to change these kinds of settings to make my experience more like it was before. The whole ‘single instance’ thing is the entire reason Android failed for me as a productivity machine. There is never a single time I want a document I open to close the document I was looking at before.
State data will be a bit weird with this. I guess when you open the program you want to see what you were just using it for, because the OS should be unloading unused apps from RAM and keeping a static state on everything.

They’re pretty smart, though, so they’ll figure it out. What they’ve done with the click/scroll touch paradigm is interesting. On Android or iOS, a single finger will tap, pan (or scroll), or hold. That’s about all you can do on those devices, despite needing to do many things, like text selection.
Microsoft gets around that a bit by using context. If you swipe downward with a finger (or, on the home screen, side-to-side), you probably want to scroll. But what if you swipe sideways, when you can’t? Well, you probably did that for a reason, so Windows has been programmed to interpret that as a selection. You can drag items or select text by starting your drag in the non-scrolling direction, and then continue wherever you wanted. If you can scroll in both directions, like in a browser page with large images, you just start the swipe in the usual scroll direction and then curve around to the direction you want. Because of this, there’s no double-tapping or holding and then setting weird bounding touch-sliders. You literally just select the text with your finger one way, and scroll the other way. Of course, you can double-tap-and-swipe to select text, too.

Windows 8 uses this contextual movement in some other places. On the start screen and wherever you’re selecting items in the metro UI, you usually scroll sideways and then select items by pulling them downward a bit. Or you can rearrange your icons by pulling them down a bit more and then moving left or right. Compare to iOS or Android, where you usually need to enter some kind of multi-select mode, first.

Just the fact that I’m comparing most closely with systems like Android or iOS says something. I don’t think OS X or any Linux distros have a mature touch platform, so it’s not something I’d even talk about. The mobile OSes, though, were born on touchscreens, and usually use them as the primary interface, so you’d hope they would’ve gotten the UI right. All the same, I’ve used both quite a bit and both feel kludgey when it comes to all the different touch contexts.

While we’re talking about touch, I might as well mention how Windows 8 does on touch-only. If you were using your system like that, you’d probably double your DPI scaling, so don’t complain too much about the relative sizes of things on the desktop. The rest of it tends to work well, except in the cases where you need some hover action. Besides that, though, there is a bit of conceptual weirdness in quickly switching from one input to another. If I’m using the keyboard, I’ll make good use of things like F11 or Alt+Enter to go fullscreen, and then I might remove the keyboard. Luckily, I can always swipe from the edges to get to the Settings charm, where a link to the virtual keyboard is easily accessible.

It’s really nice being able to swipe from the edge and get those menus anywhere I am.

They’ve got a bunch of different virtual keyboards (and of course the one I’ve got set is the one with all the Ctrl and Alt buttons), but one I’d like is a tiny little control keyboard. Just something I can use to tab between things or change fullscreen settings when I’m browsing without my type cover. I’d have to be able to set which keys are on it, I guess, which means it’s not very likely. If they could give us the tools to create our own layouts, that would be nice. Instead they’ve got a list of a hundreds or so different keyboard localizations. There were other instructions on what to do if you want a Dvorak layout.

I’ve often said about iOS or Android that they’re taking away the power-user functionality. Windows 8 isn’t bad about that, because I’ve still got access to the registry, and the Windows Desktop portion of it still works the way it did, but its RT section is going in the same direction.
Of course it’s wrong to make users learn how to use the complicated depths of a computer just to get some basic processing done, but I’d say it’s also wrong to take away the power you’ve given to the people who’ve learned how to really use a computer. I don’t want to have to live with whatever interface is chosen as the lowest common denominator.
I really hope they put some kind of developer switch in there in the future, which would give us extra access to things. I suppose the registry works like that to some extent.

When you touch the screen the mouse is invisible, but it’s still there. If it ends up over hoverable content, a tooltip will appear.
Touch is always weird, because there’s no such thing as hover. Unless they start working with camera-based finger detection or something, I guess!
Different programs, like games, handle touch differently. On some, like Minecraft, you can tap to click wherever, which means it’s easy to click on things but it’s impossible to move your cursor without clicking. On others, you’ve got to double-tap to click. This makes it easy to position your mouse, but harder to actually click. The latter is probably the most useful, in lieu of true multi-touch support. I could also just use my stylus, but it’s proven kind of weird playing Minecraft with a pen hovering in front of my face. For these kinds of games, I’ll probably just use a mouse.

On that note! I’ve looked around for bluetooth mice, and it seems impossible. Bluetooth keyboards are everywhere, but mice all use 2.4 GHz wireless technology that relies on a dongle that would take up my single USB port.

Surface Pro hardware

Microsoft gave up upgradeability with the design of Surface Pro, but the engineering is done very well. It’s got a high-quality magnesium chassis, with tiny vents all around. The front display glass feels nice.

The bottom half of the back flips out as a kickstand, which lets you prop it up on tables or your lap. The balance is pretty good, so it doesn’t flop backward too easily. You shouldn’t have any trouble with it falling forward, either. The kickstand is a bit long, or doesn’t open enough, which means the device is tilted downward a bit too much. Honestly, putting a half-inch bar of foam under the surface is enough to face the screen toward you and improve the brightness. The keyboard cover adds a little extra to the bottom, which puts it just within the minimum acceptable angle.
The kickstand doesn’t open very easily, and closes too easily, but that’s not something that matters too much in the long run. I’ve just been practicing some way to quickly flip out the kickstand, prop it up, and flip out the keyboard in one motion, to impress friends and family.

Now, some of you have probably read some bad reviews online about how this doesn’t stand up to the tabletness of, say, an iPad. Well, you know what? This isn’t a tablet. It’s an ultrabook. And a tablet.
If you want an iPad, it’s because you want something small you can hold easily and view content on. Heck, if you want that I’d recommend the iPad Mini instead of the big heavy version.
When you choose a computer, you need to look at everything. The Surface Pro is a powerful machine, matching or exceeding most of the other ultrabooks out today. It’s also thinner and lighter. If you want a tablet experience, get a real tablet. If it has to run old Windows programs, just wait until the Fall for good Haswell devices to come out. If you want a personal work computer that can slim down on a whim and be used with fingers sideways on the couch, then these laptop-tablet things are a great option. The choice is really yours.

It’s weird that they went with Mini DisplayPort, but I think maybe they’re planning to switch to Thunderbolt in the next iteration. It would certainly make sense, because then you could have all your peripherals attached to your monitor and just plug the monitor in.

It’s also a bit odd that they put a microSD card reader in instead of a a full SD. It wouldn’t have taken up much more room, and there’s really no point to it. If you need to use a microSD, there are always adapters, and full-size SD cards have more space and better speed. The only reason I could see for this is if they honestly didn’t think they could spare the extra size. Is this chassis that tight?

The battery is a nice one, and is a good-sized 42 Wh. It can easily serve you at 7.5 minutes per watt-hour, which rivals the efficiency of other ultrabooks. I’m impressed by how low Intel’s gone with their newer chips. It was only a few years ago that Atom CPUs used something in the range of 8-12 W, but the Surface Pro can idle down to 6 W of total platform power, just like the ASUS netbook I bought last year.
I don’t know how many people were netbook users for power-efficiency reasons, but I was one of them. The simple truth is that there’s no reason for us to buy netbooks for any reason other than price, now. As I type this, with my screen on kinda-low brightness, wi-fi on, browser open, type cover plugged in, and torrents downloading, I’m running at 8 watts.
Given the efficiency and the size, this computer will last you at least five hours, though of course that depends on what you do with it. I’m impressed that Microsoft managed to fit a full-sized battery into this thing.
If you put all the settings on their lowest, you can run this for six hours.
For the sake of battery health (this battery really isn’t replaceable), I’ve set ‘low battery’ to 30% and ‘critical battery’ to 25% or so. Frankly, you don’t ever want your lithium ion batteries to fall below 20%. In this case, I guess I’d get something like four hours.

Next is the temperature, because that also ties in with the batteries. I’ve noticed that the entire back of the device becomes very warm, which isn’t good for lithium ions. They don’t really have a battery memory like NiCads or NiMHs do, but if you treat them wrong they permanently lose a portion of their total life. Draining it to 0% will do various amounts of damage, depending on just how deeply you drained it, and overcharging it will also cause damage. There’s a reason your chargers will slow the charge rate after 85% or so.
Modern lithium ion batteries can last for many years, but they will incur some loss throughout time. Assuming you always charge it properly and never completely drain it, it’s mostly a function of temperature and energy level. A battery kept at 100% charge all the time (like in a laptop that’s being run on a desk constantly) will lose a far larger amount of charge than a battery kept below 80%. A battery kept at 30 degrees Celsius will lose a tremendous amount compared to one kept at 23 degrees, and even that will lose a lot compared to one kept at 16 degrees. A battery stored at 60% at 16 degrees should last many years.

With the full-body warmth of the Surface Pro, you wouldn’t want it to run constantly. Turn it off at night, or find a good cooling solution.

Actually, due to the nature of Intel’s newer cores, a good cooling solution would be great for performance. These CPUs automatically overclock themselves until a certain thermal envelope is reached, so if you’re doing anything heavy-duty the first minute is usually faster than the rest. If you can keep the machine cool the CPU will continue to run at high speeds. Intel intended for Ultrabooks to be low-power devices that run much faster on a cooling dock.

The USB port on the Surface Pro is USB 3.0, which is really nice. I got a 32GB Kingston “DataTraveler Ultimate”, which can get speeds up to 100 MB/s. I’ve also got a USB 3.0 2TB external HDD.
I’ve had the problem, though, where I want to transfer something from a flash drive to a disk, or from one disk to another. I do backups and such, now and then. There’s no easy way to do that on this, unless you use something like an active hub, but then you also aren’t getting USB 3.0 speeds (unless the hub is also USB 3.0).
I’d say two ports is really the bare minimum.

I got the 64 GB drive, because the extra 64 GB shouldn’t ever cost $100. They’ve also gone with a pretty cheap supplier, though I hear some random models are shipping with a much faster Samsung SSD.
When I got the computer, it had 29 GB or so. I deleted a couple apps, like Sports and Travel, which were each a couple hundred megabytes. I also removed Office, which is apparently pre-loaded but deactivated.
I have a 32 GB MicroSD, on which I put all my more portable installations. An old copy of Paint Shop Pro 6 that I’ve been using for the last ten years, a bunch of PortableApps, and a couple other small utilities. I’ve moved my Music and Videos libraries over, as well as some extra work stuff. I’m fully rolled out, and I’ve got 20 GB free on my main drive and 17.5 GB free on my microSD. That’s good enough for me.

I’d like to see phones made with some kind of short-range gigabit wireless solution. Transferring things to and from my phone at 100 MB/s would cut out the need for an external flash drive that would take up a USB port, the same as bluetooth cut out the need for USB keyboards and mice.

Type Cover

As I found with my Note II, having a cover on your device seems almost to take away a little bit of thickness, even though it’s adding more. When you handle touch-screen devices, you usually have to hold it around the edges, and probably lift it with a hand on either side (or fingers on either side, in the case of a phone). You could grip the very top, but then you’ve still got a chance to brush the active area of the screen and activate something.
With the cover on, you just pick it up and go. You can grasp it firmly in one hand, with your fingers halfway across the front, and not have to worry about touching anything. It’s really a completely different feeling, and I’d recommend getting some kind of flip cover if you can find it. I was going giddy over them ever since I saw the iPad 2 debut the idea, and after feeling it on my Note II and now Surface Pro I’ll definitely recommend the experience to everyone.

The type cover is a bit flimsy, but I haven’t had any issues with that yet.
The edging is strange and interesting, but not bad.
The material on the backing is wonderful, and the whole thing really fits with the Surface Pro. The material on the open face is nice, though the keys themselves feel a bit cheap.

The keyboard snaps in all on its own, which is much easier than what I’m used to with the Surface’s charging connector.

The feel of the keypresses are really nice, and I think I’d rate this as one of the better typing experiences for a while. I’m going at my full speed.

Well, up to a point. The cover has a built-in accelerometer and gyroscope, so it knows how it’s facing. When it’s closed or wrapped ’round the back, it disables itself. When you’re typing on your lap, though, the relative jumpiness of the cover (especially if you’re pounding away) can cause the keyboard to disable for a second or two. Most users would experience this as input just not happening, and I’ve seen some reviews where they wonder about the performance of the Surface itself in accepting input. You know what, putting sensors in the tips that detect when the cover is closed or folded back would solve this issue and also let the screen turn off when closed, so that’s definitely something they should look into. The alternative would be to perhaps have some kind of angle-testing measurement in the hinge, so they can keep the keyboard enabled even if it’s in weird gravitational situations.

I’m not a fan of full-height left and right arrow keys with half-height up and down keys. I’d like them all to be half height, which leaves gaps in the keyboard I can use to orient my fingers. What some well-designed keyboards do is shift the arrow keys just a bit below the rest of the keyboard, so that the arrow keys can each be a little taller while still linking their heights.

This keyboard doesn’t have right-ctrl, and it has a Fn key on the right instead of on the left. I constantly use right-ctrl to zoom in web pages, but that’s about it and I found an extension for Chrome (everything else can probably pinch-zoom).

I could never stand keyboards with media keys as default, so that Fn is required to press F1-F12. I constantly use the function keys to go full-screen, refresh pages, close pages or programs, or other things like that. For the rare times I’m setting some volume, I’m fine pressing another button.

On regular laptops, I have very little use for Fn. On something like this, with the swapped function keys, I need to use it all the time, for keys across the whole keyboard, with either hand. The almost-useless key suddenly has a bunch of requirements.
All that’s needed is a way to switch the function keys back to the fore.
Pressing Windows+C brings up the charms list, so I’d never use the Fn key to access those, anyway.
Even the things I’d normally use Fn for, like changing brightness or volume, can by done by pressing Win+I and swiping over the corresponding icon. (And there is no brightness control on this keyboard.)

There’s no application menu, which is absolutely needed when you’re navigating by keyboard.
Fn + Left, Right, Down, and Up is
Home, End, PgDown, PgUp, respectively, which is awesome, and a hard requirement for any keyboard I buy (I’ll turn down a specific laptop or bluetooth keyboard because of this).However, this keyboard also takes up valuable space with actual Home, End, PgDown, and PgUp keys, which nobody ever uses, when they could have put Application and PrintScr and maybe brightness.

Using scan-key settings in the registry, I was able to fix a lot of the keyboard; but the four Charms keys and the four media keys have unrecognisable scan codes, so I just wasn’t able to fix my function keys.
I got around it by mapping F4 to CapsLock, so that I can use Ctrl+CapsLock to close web pages or Alt+CapsLock to close programs.
F5 and F6 are within reasonable distance to the sole Fn key to the right of the spacebar.

Key summary: There must be an option to swap the function keys with the charms and media keys, the four navigation keys are encoded into the arrow buttons and so shouldn’t be duplicated up top, and those four liberated keys should include keys like print-screen and the application menu. I also like half-height left and right arrows with gaps above to help orient my fingers.
Adding right-ctrl would be nice.

And now for the trackpad.
It does its job, but it takes a 2mm swipe to get started. The tracking is actually pretty good when you’re moving your fingers across most of the pad to navigate across the screen, but stop-and-start precision work is maddening. If there’s a little link I’m trying to hit, I’ve got to go slowly until the cursor starts moving and then stop before I overshoot. If I let my cursor idle at all, I have that 2mm delay again.
The whole surface is touch-sensitive, including the spots where the left and right mouse buttons would be, so the delay is there to stop the mouse from moving around when you’re trying to click. I’ve had that happen, somehow, and I can see why they wanted to fix that.

The material is kind of rubbery and sticky fresh from the factory, so your finger doesn’t really glide. If you’re already going, it’s not bad, but if you’re stopping and starting your finger vibrates. It gets better after several days, but it’s really icky and should be conditioned a bit before shipping.

You can scroll with two fingers, and Microsoft has released a tool to let you choose which direction.
Each time I scroll like that, my cursor jumps in that direction a little. If I have a particularly stubborn program that needs several swipes to scroll all the way, especially if I’m working in a small window, I’ll need to reposition my cursor every few scrolls. It seems Microsoft’s drivers aren’t especially good at discerning when you’re trying to scroll with two fingers, so you need a certain speed.

The clicking uses a clickpad, one of those things where the hinge is at the top, so if you’re pressing too hard and you hit the left-click area in the bottom left it might not unclick. It’s still a lot better than some clickpads I’ve used. It’s a bit weird; you can press down hard anywhere on the pad to execute a click, if you want to, but you can’t slide from there to perform a drag. You’ll need two fingers.
If the seating isn’t right, the clicking might be hard. This is a pretty flimsy cover, so you’re really relying on the spacing and pressures being right. If you flex the cover too much, that’ll actually click the trackpad.

When you get right down to it, mousing around and then clicking is a multitouch action. I’ve had times where the click sent my mouse to the opposite side of the screen. The buttons are actually part of the trackpad itself, which is why they have that 2mm drag distance. Just disabling that portion of the trackpad and removing the delay would drastically improve the usability of the trackpad.
As it stands, trying to scroll somewhere and right-click is a nightmare. Trying to hit an icon and right-click on it can take upwards of ten seconds.

There needs to be some kind of software update or something to get rid of the driver issues.

On the whole, the cover is a bunch of kludges to fix tiny issues that in practice end up ruining the usability of the keyboard and trackpad. Because of the accelerometer used to tell if the keyboard is being opened or closed, typing on an unstable surface causes the cover to jump around enough to disable it. Because the touchpad surface covers the entire touchpad including the keys, they had to add that insanity-inducing 2mm delay so that the cursor doesn’t move when you try clicking a button. Because the buttons are part of the multi-touch touchpad, and there’s only a single button, it relies on data from your finger position to cause a right-click, and will execute a left-click if you end up clicking with your fingernail or something.

My old HP Mini has a touchpad about that size, but with physical mouse buttons on the left and the right. This could really use something like that, or at least two buttons underneath the clickpad, because relying on capacitive touch data to drive the right click is just weird.

Honestly, I could accept all the flaws of the touchpad if they could just get rid of that 2mm delay for all touches originating above the button zones.

So, overall, the type cover is really good, but needs software adjustments. The only real hardware changes that need to be made is to change the Home/End/PgUp/PgDn keys to other ones and maybe add another button under the touchpad for right clicks. Oh, and fix up the positons of the arrow keys.

The software, though, is really a killer, and the current drivers will cause a lot of people grief—especially if they don’t know what’s going on in the background, and so can’t adjust their environment accordingly.

Customizations

I’ve done some things to make Windows 8 work for me. First, I’ve got a touch screen and pen input and all that jazz, so I don’t have to worry about using the Metro interface with a mouse. All I’ve got to do is work around some of the design constraints of the system.

I’ve changed the taskbar items to be regular non-stacked labels instead of tiles, because that’s how I roll.

I raise my taskbar to be two levels high, which shows me additional date stuff and lets me unhide all the notifications without cramming up my space.

I added a toolbar for C:\ProgramData\Microsoft\Windows\Start Menu\Programs
I left the title there, but shrank the bar so that no icons are visible. When I click the double arrow, I get the full Progams list that you’d get on the normal start menu. There’s a bit of weirdness, because that doesn’t include the stuff in the user folder. Windows usually combines the two in the start menu. I created a bat file with the following command:
@echo off
robocopy “C:\Users\[Your name here]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs” “C:\ProgramData\Microsoft\Windows\Start Menu\Programs” /E
I opened the Task Scheduler and made that run every day.
You may need to go to C:\Windows\System32\Tasks and set the RunLevel: (Just replace the one that’s there) HighestAvailable

If you want to put your Pictures or Music libraries on an external card, just go to C:\Users\[You]\ and Cut-and-Paste. You can’t create a library on external media for some reason, but you can still create it in the normal spots and then copy it over.

This is a full computer, so there’s no connected standby like you’d get on an ARM tablet. Intel is going to release that feature this summer, so expect that kind of tablet computer next year.
For now, pressing the power button on the top of the device will send the computer to sleep mode. Sometimes I don’t want to wait a few seconds for it to wake and then re-input my password, so I’ve downloaded a utility called nircmd and put it in my Windows folder. Then I just created a shorcut on my desktop like so:C:\Windows\nircmd.exe monitor off

By default, the Surface Pro ships with 125% DPI scaling. That means all the UI elements are just that bit bigger and you can click things far easier. This is better than just setting resolution because things like the text should still be crisp.
I decided I wanted everything at 100%, and just set the individual text sizes bigger. You can do that through the same panel used to set DPI scaling. That doesn’t change things like icon width, though. In order to better see the text below icons, I went into the registry and changed some things in
HKEY_CURRENT_USER\Control Panel\Desktop
MenuShowDelay
I’ve got it at 200, but 140 would be quicker.
WheelScrollChars
20
WheelScrollLines
20
You can also create entries for DoubleClickWidth and DoubleClickHeight to set the size of the invisible box that you double-click into. This can be handy for drawing with pens, because you can set it to just a couple pixels.

And inside Desktop\WindowMetrics
IconSpacing
-1995
IconVerticalSpacing
-1320
Those space out the desktop icons a bit to give the text more room.

Also, in Control Panel\Accessibility\Keyboard Response I set some of the Filter Keys setting. The UI limits you to choosing things like 1 or 2 or 3 seconds for key repeat, so it’s obviously for people with disabilities, but I like to think the accessibility panel should also cater to my special needs. I set AutoRepeatDelay to 190, AutoRepeatRate to 16, BounceTime to 0, DelayBeforeAcceptance to 0, and Flags to 27. Basically, when I hold down a key, it takes 180 milliseconds to start repeating, and repeats that key every 15 milliseconds. When I’m using the arrow keys or backspace key to traverse large amounts of text, the extra speed comes in handy.

I mentioned remapping my keyboard a bit:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
Create a binary key called Scancode Map and use these values:00,00,00,00,00,00,00,00,06,00,00,00,37,e0,57,00,5d,e0,58,00,3e,00,3a,00,58,00,51,e0,57,00,49,e0,00,00,00,00

You could also search for a program called SharpKeys at RandyRants.com.

I use a program called Winsplit Revolution to move my windows around. First, go to the Control Panel and find the Ease of Access Center. Go to the mouse options and click that last checkbox to disable Aero Snap. Install WinSplit, then set the keyboard shortcuts to be things like Ctrl+Shift+1 instead of Ctrl+Shift+NumPad1. The default locations are actually really good for this screen, with thirds and halves easily accessible.

I also downloaded something called Battery Bar, which tells me the health of the battery, exactly how many milliwatt-hours I have left, and keeps score on how many hours of actual use I’ve historically gotten on average. By comparison, the Windows battery icon just tries to predict how many hours you’ll get based on current usage, which fluctuates wildly.

January 2nd, 2012

And math!

Everyone who sees it loves the iPhone’s Retina Display, but there are new 720p smartphones coming out that are getting some people to gabber joyously.

And so I asked myself the question, “What would the screen size need to be for a 720p Retina Display?”
First, what is Apple’s Retina Display? The screen is 960 x 640, and is 3.5 inches diagonally. As we’ve been taught by Pythagoras, the area of the square drawn on the hypotenuse of a right triangle is equal to the sums of the areas of the squares drawn on the other two sides, so we can find out how many pixels there are diagonally.
960 * 960 = 921600
640 * 640 = 409600
The root of 921600+409600 is ~1153.8

November 24th, 2011

As a writer, I’ve tried a few different formats. I think it occurred to me, one day, that newer formats won’t work on older systems, and old formats could lose data in the future when programs try converting them to newer formats.

I’ve been writing in plaintext files, which is of course human-readable. The only problem I had is that I can’t italicize or bold, and other formatting options were severely limited.

I tried RTF, but a look at the source made me cringe. It wasn’t even as if they added codes where the formatting was; it was more like every second word was just a slurge of backslashes and random characters. It was not human-readable.

So what’s human-readable and still rich-text? I had the idea to do something with HTML. I created a simple document with a contenteditable attribute set to “true”. I also did a trick to make the style element visible by setting both head and style to display:block.
I was left with a page that I could alter at will, using such built-in short-cuts as bolding and italicization. If you look at the source, there are <b> and <i> elements around certain bits of text in <p> elements, all completely human-readable. I can just save the page back to my drive.

I also made an external css sheet specifically for writing books, which I @imported in by throwing it into that editable style tag, and I made some convenience JavaScript which I insert by dynamically creating a script node at the end of my body and inserting it into my head.
I’ll go on about that script some other day, but it basically gives me keyboard shortcuts to insert things like em dashes and horizontal rules, and asks me if I really want to leave if I have unsaved changes.

If I press Ctrl+S, it removes the external script from the document before saving. This way, there’s no whateverpage_files directory taking up space and causing my page to constantly point to an old JS file.

It’s pretty nice! I can easily change the size of the text or the typeface to suit my mood, and there isn’t too much clutter in my actual file. I’ve got my stories in a format that will most likely last longer than any other. It’s kept in an XML format, which means I could very easily make an ePub book out of this when I finish it.
Or I could use some sort of XSL transformation script to output ePub as I’m writing it, if I want to share.

October 14th, 2011

(Specifically, I got the 1015PEM-PU17, but the only difference is the bigger battery.)

So, I just got a new netbook, with the next generation in hardware and thirteen hours of battery life!

It didn’t come with thirteen hours, of course. A lot of people will choose storage space over speed, and so most netbooks these days will come with a slow and power-hungry HDD. I upgraded mine immediately to a 60GB OCZ Agility III, which is supposed to run below 1 watt at idle.
I also upgraded the RAM to 2 GB DDR3.

Most reviews try to tell you everything about a machine, but a good design is supposed to go unnoticed. Instead, I’m going to tell you everything wrong with it.

The keyboard is crappy, at best. The keys come up through a grid of plastic. This plastic sometimes catches on the keys a bit, and makes them hard to press. The chiclet keys are also a bit small because of this, which usually isn’t too detrimental.

One thing I liked about my HP Mini was the small, wide arrow keys. On this Eee, the arrow keys are so narrow I can’t get all three fingers on them side-by-side.

The Shift key is to the left of the Up arrow key, which is completely unintuitive. To the right of the arrow key is an extra Fn key. Because of all the keys right there, the ‘/’ key is very thin.

There are no lock indicator lights, so if you accidentally hit CAPSLOCK you won’t know until you try typing something. There’s a little utility that pops up in your tray to tell you if it’s pressed. I’m not even sure why Caps is needed on today’s systems.

The touchpad is some crappy Elan thing, and tries to do a buggy implementation of multitouch. Gestures tend to jump around a lot. The regular mousing is more or less fine, but a bit gummy — there’s a barely-perceptible lag when moving the cursor. No support for areas or anything, like Synaptics has.
The touchpad is set out as an area somewhere in the vicinity of the clicky buttons and two thin strips to the left and right. If you finger the pad a little, you find out that there’s no response in the first 6mm from the left and a few from the right and bottom.
It’s active right at the top edge, which is incidentally right under the keyboard’s space bar. If you press the spacebar the wrong way, you’ll end up clicking the mouse, and your cursor will go flying about.
I never have problems with my thumbs resting on touchpads, and this isn’t quite the same problem. Most people type with their thumbs mostly horizontal, so when they press this spacebar their thumbs will contact that leading edge of the touchpad.
I might be able to physically move the touch sensor by opening the case, but the only external solution I can think of is to put some sort of tape or other obstacle so that I’m not constantly touching the pad when pressing space.

When I close the lid, the touchpad starts basically going wild across my screen. I was playing a radio show in VLC, and it was jumping all over and changing the volume. It seems the electrical signals from the screen are enough to trigger the touchpad. Changing the sensitivity may help.

The screen is fairly bright at maximum, but it’s also fairly bright at minimum. Considering that when you put it on minimum you want A) a darker screen or B) better battery life, it doesn’t make sense that you can’t turn these down further. Consider also that screens are one of the biggest power-drains on your system.
This one takes between 1.5 and 3.8 watts, depending on the brightness. I could get four extra hours out of this battery by turning the backlight off completely, but it sounds like the only way I can do that is to use some version of Linux. I’ve searched for hour and hours on how to turn the backlight off in any version of Windows, and haven’t found anything.
The screen is semi-transreflective, so angling the sunlight a certain way will light up the screen beautifully. It’s like popping back into the Gameboy days. You just have to have the light coming in 30 degrees or so from the left, with you in front.

This has pretty good wi-fi, but it’s not as strong as my HP netbook.

‘User-Settables’ in general
When it comes to the speakers, the disply, and wi-fi, the users should really be in control. If I want to save power, I’ll turn my speakers low or off, turn my backlight low, turn my CPU down, and tune down or disable my wi-fi. If I’m docked, though, at full power, I’d want my screen to be the brightest possible, and my speakers to be loud, and my wi-fi to reach over great distances. There’s no reason to limit us so much.
ASUS helped a little with their Super Hybrid Engine, which lets you overclock a bit or reduce your CPU multiplier with a couple clicks.

ASUS’s Expressgate: useless
It takes just as long to start up as Windows, doesn’t support any programs, actually uses more battery, and is nearly impossible to set up without crawling through menus for half an hour. All in all, it’s useless in every way.

The netbook opens about 130 degrees, which just isn’t enough for everything. If it’s on a flat table or angled backwards, the screen is fine or you can close it a bit, but if the computer is angled forward, there’s no way to open the lid any more to get a good viewing angle on the screen.

At its thickest point, the netbook is 38mm (1.5″). At its thinnest, it’s about 4mm. There’s a whole lot of wasted space at the front, in the thinnest spots, and the back of the machine contains 50% of the weight. As such, you can’t open it with one hand, because it tips backwards. It’s also hard to set it on a surface while open, because the weight is in a weird spot in relation to its back feet.

The keys all have an open back, so anything spilled on the keyboard will immediately drip inside. There’s a bit of plastic backing, but there’s not much protecting the important bits.
The bottom is covered in holes. There’s a vent immediately over the RAM, and there are slots in the front for the speakers. You don’t want to carry this around in the rain.

Speaking of those speakers, it’s terrible trying to listen to things while it’s on your lap. If anything gets in front, of if you tip it forward a bit, the sound is muffled. I’ve had a few systems with speakers out the front, and I can’t understand the design choice.

I don’t know why the RAM is limited to 2GB. Back in the days of Windows XP netbooks, Microsoft mandated that they could only use that operating system if they had 1GB or less, and had screens of 1024×600 or smaller. These restrictions were eventually loosened, and there’s absolutely no reason why a machine running Windows 7 should have these.
Why won’t a 4GB DIMM fit in here?

USB 3.0
ASUS originally shipped the 1015PEM with two USB 3.0 ports, but they decided a little while later that they would just put USB 2.0 ports from then on. A lot of resellers didn’t pick up on this, and still advertise USB 3.0. Don’t be fooled.
Those two USB ports are on a daughter board that would be easy enough to upgrade if you can find a 3.0 version later.

Specifically good:
The battery life is amazing. It brings you into a completely different mind-set when you look at the indicator and see that you have ten hours remaining.
Throughout the day, I never have to worry about charging.
As I sit here, I’ve got 17.2% battery with about 2 hours remaining. It’s 8:30 PM, and I’ve been sitting here since 12:00 PM. I had the wi-fi on most of the day, too. 10-13 hours is pretty good.

The wi-fi range is pretty good. Not the best.

The screen is nice and bright. The transflectance is a bonus. I’ll have to look at the color gamut, because it seems more vibrant at some points but then red seem darker at others.

The 2.5″ drive bay is wonderful, because I can actually have a real 2.5″ SATA SSD, for the first time. I’ve gotten it down to a 20-second boot.

This model has VGA, so I can finally use external monitors. I was getting tired of my HP’s inability to work with anything more than 1024×600.

And now for some power things.

Due to the nature of new CPUs and C-states, the battery life flickers around dramatically. I find that the entire system tends to run at anywhere from 4.5 W to 7 W at desktop with the screen low. If it’s constantly at 7 W, a restart usually helps it get back down to 5 W.

December 14th, 2010

(From A Student View)

When an institute is teaching programming to new students, it’s a common theme to play around with Java before going on to other languages. It’s easy to learn, has all the Object-Oriented goodies instructors want, and is fairly ubiquitous.

With the current snafu that is Oracle circling around Java and all the rest of Sun’s old open-source projects, I decided I would try my hand at emulating those same principles using JavaScript; an open, simple, ubiquitous technology.

As it turns out, the resemblances end with those adjectives. JavaScript was never really meant to do the things we’re making it do now. It’s possible to do most things in most languages, but the verbosity of the code needed to perform a specific action tells you what it’s made to do, and what’s been tacked on as an after-thought.

So, from a student’s point of view, how does it matter which language they’re using? Which is easier to learn, or simpler?

Java:

Requires each class to be in its own file. It can be tedious, but it can also make it easier to manage.

Each file has one class. Each class has a constructor (sometimes overloaded), and zero or more methods. The structure is fairly simple.

Besides the keywords, not much is being used. If you don’t import anything, there are very few class names already taken.

It’s made to work with the console, or to display a GUI.

Inheritance is an important part of Java, and all you need is one keyword and the class name to inherit.

JavaScript:

Everything can go everywhere, and the syntax can go different ways. This freedom can be devastating to those who are learning.

Objects are functions, and functions can go within functions, and what are closures, anyway? Where and how you create variables influence how you can access that variable later in the program (private, public, hidden, privileged, for either fields or functions).

The global scope is chock full of different classes and attributes and functions.

It’s not meant to do anything on its own. You have to teach students HTML and DOM manipulation at the same time, and programs have to output in HTML.

Inheritance is handled through the prototype chain, which has to be explicitly set after an object function is created. You have to set the prototype of that class to a new instance of the parent class, and then you have to set that prototype’s constructor back to the constructor of the current class (to ward off some edge cases).

I’ve made a sort of console window out of HTML. It overwrites the document.write(), prompt(), and confirm() methods to output to a <pre> element. The latter two also pause execution by opening an invisible modal dialogue that is closed when the Enter key is pressed, which enables synchronous user input.

It’s a cludge, but you can run any JS code in there that acts like a console Java program.

Later: GUIs.

In short, You can do Object-Oriented programming in JavaScript, but it’s not something you should be teaching students in their first semesters, and the complexity and power of it don’t lend well to simple instruction.

I’m going to keep playing around with this, to see if I can get something simpler out of it. I just got the ‘instanceof’ keyword working, so I can start chipping away at what I need to get a ‘true’ out of that.

December 3rd, 2010

I use Explorer to browse.

No, I’m not talking about the internet. Explorer.exe is the file browser that comes with Windows, and which manages your taskbar and other windows. If you’re a Windows user, you use it every day whenever you open a folder. Mac and Linux have their own file browsers, as do different operating systems on different CPU architectures.

Anyway, I’ve recently noticed that I browse differently than other people do. I open My Computer (or whichever folder on my desktop), then click through the folders leading to my destination. I know the file structure intimately, and can tell you where certain files are. When I get to the files I want (executables, text, web pages, program code, whatever), I execute them, view them, zip them, or open them in a program. Any time I’m working with files, I’ll be in that directory. Any time I want to move or copy files, I’ll have both directories open.

Lately, I’ve been helping students who focus on the programs themselves and use the ‘Open…’ dialogue to open files. It’s a completely different way of thinking that drives me silly, especially when they eventually need to browse through folders. Especially in crappier (i.e. Java-based) programs with a miserly Open dialogue that doesn’t let you copy or move files, or select more than one file,or right-click on files.

It’s just one of those differences that you never notice until you meet it.

Michael Kozakewich is a computer analyst/programmer in Winnipeg, Manitoba, Canada.
Since the beginning of 2009, he has studied the web: design, new technologies, content management, user experience, information architecture, typography, and everything else.