Monday, June 22, 2009

Slow Internet and Trackbacks

On a sad note, due to a screw-up with the guy who wanted to change us to Telstra Clear broadband, we’ve been on dial-up this last week. (And, due to another screw-up with technical support, it was all unnecessary – Vodafone hadn’t disconnected us yet!) Fun.

In other news, this blog now has trackbacks (thanks to JS-Kit), so if you want to show your readers what a blog with no readers looks like, I’ll know about your blog post. Yays!

--MarkKB

Sunday, June 14, 2009

UAC is not (that) broken in Windows 7

A few days back, Long Zheng (who has my upmost respect as a blogger) published (another) article about UAC. Before we discuss that, let’s summarise the article linked at the top of his, written by Microsoft’s Mark Russinovich:

  • UAC was made primarily to make life easier for standard users. Ergo, standard users could use Vista with relative ease, as opposed to, you know, pretty much not at all.
    • It does so by using a split token – users would run in standard mode, and get a prompt to elevate when needing admin privs.
    • In this way, people could set up an admin account for big swabs of admin fun, while using standard accounts normally without having to switch to the admin account for e.g. installing stuff.
  • Many people were complaining that they still had to get great swabs of prompts to elevate to admin while they were using an admin account. Still others complained about redundant and unneeded prompts.
    • Microsoft responded to this by cutting down on multiple prompts and removing unnecessary prompts.
    • They also added a security token to some programs that will make those programs autoelevate some tasks in admin mode. That way, admins can do their great swabs of admin stuff without getting a prompt every minute or so. Pre-emptive comment: that was an exaggeration to make a point. I know their must be something seriously wrong with my computer to get a prompt a minute.
  • UAC is not a security boundary. In the end, it is up to the user to decide whether or not to run that program.

Zheng’s primary point of contention is that programs will inject code into other programs to elevate themselves to avoid the hassle of doing it themselves. This ignores several things:

  • It is actually harder to inject code into another service than to set up an elevated COM interface (or autoelevate your program.)
  • People doing this are just begging for their programs to be broken in the next release of Windows.
  • It is unlikely that any major software developer is going to do this, since they usually submit their programs through WHQL, which are sure to pick up on this practice.
  • Programs can do this anyway – that is, piggyback on some other programs’ UAC prompt using injected code. Once someone else's code is running, “your system” isn’t *your* system anymore.
  • If you’re a virus writer, it’s easier to tell your users to elevate first than to go through the hassle of code injection.
  • Finally, standard user will still get the prompt. If you are running as admin, you either a) should know what you’re doing, or b) shouldn’t be admin in the first place.

I’ve also seen some people claim that this allows Microsoft to parrot “make your programs UACified” without doing it themselves. Er, no, because they still have to make it work in standard user. The whole admin thing is to make it easier to set up your computer, then set up a standard account.

Having said all that, I do think Microsoft is making a mistake, and I for one will be pushing the UAC bar all the way to eleven. However, treating it as some inherent flaw in UAC is missing the whole point, which was to run as standard user without switching accounts.

As an added bonus, Rafael Rivera (who I also have a lot of respect for) asks why the icon is a shield if it’s not protecting users. I can think of a few reasons:

  • Its use steams from the Security Center in Windows XP which was (shock horror!) a shield. Although Security Center is no longer in Windows 7 (replaced by the Action Center), the icon remains for non-confusion.
  • (submitted by Bad Analogy Guy:) Like a proper shield, it’s up to the bearer to decide whether or not to hold it up or down. However, knights don’t wear shields when they’re hunting, nor do lords when they’re beating up peasants *ahem*, making proclamations and laws and whatnot, because they can be reasonably sure that they’d be safe.
  • Marketing and programmers don’t talk very well to each other.

Have a great day, I’ll be here all week. Try the veal.

--MarkKB

Friday, June 12, 2009

Operating Conventions Part II (How To Fix What Shouldn’t Be Broken)

This is part two of Operating Conventions, which is itself part of Bad Things Programmers Do. You can read Part 1, but you don’t really have to.

Method 1: Just Fix It

Seriously. Redirect your file open dialogs to the proper My Documents (or better yet, remember the last location.) Use Windows Contacts. Use the favourites folder. Do it the right way, and it won’t be a problem anymore.

Method 2: But compatibility!

If you really must, because some program written years ago by a developer you don’t even know is still alive depends on it, then keep a compatibility struct synced to the OS’s APIs. Make it plain that other developers are not to use the old way anymore, as it may disappear off the face of the earth at any time (this is called deprecation.)

Method 3: But my way is better!

If you truly believe your way is better, then its’ still up to you to keep the OS up-to-date. Use proprietary extensions that other programs will ignore. At the very least, do it your way completely, but keep the OS version synced to any changes.

Remember, above all, if you do it right the first time, you don’t have to worry about compatibility later down the road. Your users will be happy, you’ll be happy, and other developers will be happy too.

Next time on Bad Things Programmers Do, we’ll talk about HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths, otherwise known as the bane of my existence (because programs don’t register themselves there.)

Ciao!

--MarkKB

Saturday, May 30, 2009

Project Nelson 1.0 Build 019

OK, this is a little late (due mainly to my procrastination ;) ), but no worries, here it is! Project Nelson 1.0 Build 019 introduces a few new features, fixes quite a few bugs, and polishes up some places which needed it.

Remember, to submit a bug, click on the Report bug icon at the lower right of your screen. I can’t fix your problems if I don’t know about them! (It looks like the guy to the left.)

Project Nelson home page
Project Nelson download page
Build 019 Changelog
Build 019 Readme

Saturday, May 23, 2009

The State of Audio on Linux Part 1 – Insufficient Memory

My memory sucks.

Yesterday, I was talking with Jonathan (a friend) about Linux on the Desktop, and I remembered something I had read half-a-year previous about the state of audio on Linux. I couldn’t remember what it was, only that it involved mixing – I put it down to the inability to do hardware mixing.

This was the article I read. Oops. ^///^

For those not willing to RTFA, it talks about the history of Linux audio. First there was OSS. Then OSS became proprietary (teh EVILS!), and then the free version of OSS got old, so ALSA was built to replace it. Unfortunately, ALSA was completely incompatible with OSS, so they had to include emulation to support both older apps and people who didn’t want to learn ALSA. But the emulation wasn’t all that good in that it doesn’t do software mixing, which defeats the purpose of using ALSA in the first place.

So, to sum up, ALSA doesn’t do software mixing for its OSS compat stuff. My bad.

OK, so how is Audio on Desktop Linux really? Stay tuned!

--MarkKB

Sunday, May 17, 2009

Comic Strip 1.0 Build 07

cs

As promised, here’s Comic Strip 1.0 Build 07! This build has a bug in the way it handles author comments, but apart from that, it should be OK.

The main reason I want to get it out there is to test the new prev-next comic buttons, so hit Count Your Sheep and start clicking away!

Comic Strip home page
Comic Strip download page
Build 07 Changelog

Saturday, May 16, 2009

Finished.

Hey guys! Just dropping a note to say that Project Nelson 1.0 Build 019 is complete as of April 14 2009. I’ve already finished the changelog, and just need to fill out the readme. I plan to release it by Monday at the earliest.

(I’m already well into developing Build 020, and I’ll try to have it out quite a bit sooner than the Build 019. :D)

Comic Strip 1.0 Build 07 is also done, and I hope to release it by the end of the day. Remember, these are estimates, and not hard-and-fast dates.

Happy testing!

Sunday, March 01, 2009

Website Updates

About two weeks ago, I preformed a major upgrade to my website - including a new look!

image

(I’ve been meaning to blog about it, but I keep forgetting… :D)

There are still a few things I need to fix up, but apart from that, it should be fine!

In case you’ve forgotten, or stumbled upon this via Google, it’s located at http://markk-b.sitesled.com – you can also visit it via the sidebar on the right.

Highlights

Comic

I’ve uploaded <Ctrl><Alt><Bkspc>, a comic I do in my spare time. Whereas only a few of my classmates have previously seen it, now it’s been made available to everyone with an internet connection.

New software

Comic Strip, a webcomic viewer.
Corkboard, a noticeboard for home networks.
Gibraltar, an easy-to-configure installer.

I’ll probably expand on these later, but for now, cherrio!

--MarkKB

Thursday, January 15, 2009

Operating System Conventions

Operating systems have a way of doing things. They provide APIs for developers to hook into and use, and default locations for users to put stuff into.

For example, most operating systems now provide a Documents folder as a default location to put their stuff in, a Bookmarks or Favourites folder to store website links, and music, picture and video folders for various media types. Vista also provides a common Feeds API, and a common contacts framework.

However, many programs are not updated to support, or worse, completely ignore these conventions. While this is not always a big deal to the developers and power users, it is a big deal when Ma switches from one app to another and can’t find her stuff. (They may not be using your software, but you’ve just completely alienated them from trying it out again, or recommending it to others.)

Non-Deliberate Examples

Operating systems often replace functionality that has traditionally been handled by programs. For example, before Microsoft introduced the My Documents folder in Windows 98, most word processors saved their documents to C:\Documents, C:\My Documents, C:\Docs, or variations thereof. At least by 2002, one (admittedly minor) word processor was still doing this, saving to C:\Documents\<insert program name here> Docs.

The same thing happened with the Downloads folder in Windows Vista – even today, many popular download managers and *ahem* file sharing apps don’t download their files to the Vista Downloads folder.

And, of course, we must not forget how every single game seems intent on putting <Program Name> Saved Games in my Documents folder, rather than App Data where it belongs, or the user’s Saved Games folder in Vista.

(I myself am not immune – File Manager “Nemo”’s fav folders idea was formed before I knew Vista would have a similar feature, and developed before I had a working build of Vista to play with, for example.)

And Then There’s…

Some programs deliberately ignore conventions altogether – whether it’s to create a “walled garden” to keep users in, because it’s out of spite or contempt, or simply because it’s the way they’ve always done it.

Browsers are a rather egregious example – apart from Internet Explorer, the default browser in Windows, none of the major browsers use Windows’ Favourites folder for their favourites/bookmarks, and none of them use each other’s bookmark database (although many use the same system.) This one stands out particularly well, seeing as Windows has had a bookmark folder since Microsoft started shipping an internet browser with Windows - Windows 98 with IE4 in 1998, just over a decade ago. They aren’t even stored in some proprietary format – they use plain text, and Windows even provides an API, just in case you don’t want to do the heavy lifting yourself.

The common Feeds API is another example – Apart from Microsoft’s own Internet Explorer and Windows Live Mail, no other program that has anything remotely to do with RSS/Atom feeds uses it.

A particularly annoying one is how email programs’ contact/address books – heck, anything with some kind of contact system – seems to use their own system of doing things. Although Outlook Express/Windows Live Mail have generally been good with this, even Microsoft Outlook doesn’t use the default OS contacts database of their own operating system. (Windows Live Messenger doesn’t do it either. Hmm…)

Next time, I’ll discuss how to fix these problems without breaking your apps. ‘Till then!

--MarkKB

Wednesday, January 14, 2009

The road to Project Nelson

In this post, I’m going to shed some light on the state of Project Nelson going forward, as well as some insight on its past.

Past

In the past, Project Nelson advanced a build when it was “done” – when I felt it had enough about it to warrant a new build. This method worked for my methods, if it was a bit haphazard. Every build had a few bug fixes and new features, and so on and so forth.

The first real break in the cycle was Build 017. Build 017 was a “features” build – that is, it focused on features, as opposed to bug fixes. It finally introduced Category pages, something that had been planned since the first few .NET-based builds. It also added hidden Run boxes in the Applications page, and Application “views” (Categories/Classic Start/Recent). The First Run Wizard was heavily rewritten, and Nemo’s favourite folders feature was implemented. Build 017 also featured the first build of MediaPN.

Build 018 was the first build that intentionally focused on features, as Build 017 being one was kinda just a fluke. With Build 18 came application task pages, a semi-functioning Games page, a stopwatch, “Windows” vs. “Project Nelson” icons, a seek bar and metadata about the currently playing song in MediaPN, New File in Nemo, command-line arguments, SchedulePN, Nemo settings, and starting your default media player at startup. The First Run Wizard lay the backbone for the new way of handling applications in each group.

Present

Right now, I’m working on Project Nelson 1.0 Build 019. Build 019 is a “bug fixing” or “fit and finish” build – it’s not going to be a big bang release, although there are some new features. Rather, it’s focusing on polishing the user experience, and fixing annoying bugs.

I hope to release Build 019 sometime in the next two months.

Future

Going forward, I plan to adhere to a kind of back-and-forth schedule, with even-numbered builds being feature or “unstable” releases, and odd-numbered builds being bug-fixing or “stable” builds. (That’s not to say that they don’t have bugs in them, btw, it’s just that I’m devoting the build to fixing them.) I have quite a few ideas for the future of Project Nelson, such as the new file copying system, as well as building on the program modal implemented in Build 018, and a new taskbar system.

The next few years are waiting, and I hope they’ll be just as exciting as the previous ones.

--MarkKB

Sunday, December 14, 2008

Er… that was a long break…

Sorries! ^^;

We finished our final exams earlier this month, and lately I’ve been taking a break from most stuff, and catching up on my artwork. Don’t worry, I’ll finish my blog series :D

Project Nelson 1.0 Build 19 is well under way, and I hope to release it next month. I’ll also be putting up some of the other stuff I’ve been working on, but I probably’ll have to do it next month as well.

Oh, and I finally bought a copy of Windows Vista! It’s here, sitting all nice and shiny on my main computer. It means I can work out all the bugs of PN on Vista, implement UAC support, all that rot. ;) (It also means I no longer have to test against a beta version on a old computer that still thinks it’s 2006… ^^)

Tuesday, September 23, 2008

Bad Things Programmers Do

[Updated 14 Jan 2009 with new article titles.]

I’ve decided to start a series about the bad things many programmers do. Suggestions at markkeyb@gmail.com would be appreciated!

Many things on this list are about things that programmers shouldn’t really do, but do anyway. Many of them make small little programs, but some are really high profile or really popular, and often are looked up to by less prominent programmers as how to do things, which only propagates the problem.

Articles in this series:

Operating System Conventions (Part 2)
App Paths? What App Paths?
Uncommon Controls and Dialogs
Hardcoded Paths
Inappropriate Tray Usage

This list will be updated with links when I’ve published the articles. Yay!

--MarkKB