anotherbyte.netanother byte

Quotes from a discussion on MetaFilter regarding the Malaysian "Computing Professionals Bill"

Published
10 Dec 2011
Updated
10 Dec 2011

Apparently Malaysia is proposing a Computing Professionals Bill. Here's a draft of it.

An Act to provide for the establishment of the Board of Computing Professionals Malaysia and for the registration of computing practitioners, computing professionals, sole proprietorships, partnerships and bodies corporate providing Computing Services and for purposes connected therewith.

Seems like it might be ok, but will most likely result in stifling innovation, even more government censorship (via a very sneaky means), and perhaps even reduce the number of "IT professionals".

From the MetaFilter discussion:

Sometimes I have to wonder if technology isn't really just making people stupider.
No, they've always been this stupid. Technology just makes it easier to see it happening worldwide. - Celsius1414

Time for a new maxim? "Technology isn't making people stupider, it's just making the stupid more obvious."

Any sufficiently advanced technology is indistinguishable from magic. Any sufficiently ignorant politician in a society with advanced technology is indistinguishable from a witch-hunt participant. - Inspector.Gadget

From the Act:

Computing
is a goal-oriented activity to plan, architect, design, create, develop, implement, use and manage information technology or information technology systems.
Computing Graduate
means a person who has completed a computer science or equivalent degree programme of study.
Computing Practitioner
means a person who has a job function in computing or qualification in computing.

That essentially covers sitting at a computer and typing. Which I would venture a guess that pretty much anyone might do. Do they all need to be registered?

Another MetaFilter quote:

A lot of times these professional certification things are about protecting incumbents from new competition. [...] Basically incumbents will setup licensing systems to create an artificial scarcity of them so that they can keep prices high. - delmoi

A scary piece of legislation. Also, is it odd that it's in English?

Selling a desktop PC

Published
19 Nov 2011
Updated
19 Nov 2011

I've decided to migrate from a desktop to a laptop, so I'm selling my desktop PC. I've used it for work (software development) and gaming - has served me very well and should be more than enough for quite a few years yet. Here's the specs. Please note that:

  • Does not include hard drives, monitors, speakers or keyboard.
  • I bought and assembled everything in May 2010.
  • I'm not selling individual components separately. It's all assembled and ready to go.
  • You'll need to pick it up. I'll take this into account in the price I'll willing to sell it for.
  • All components work. In the interests of full disclosure, there seems to be irregular drop-outs when using the motherboard's Ethernet.
  • I'd like to be sure that it works for you, and if you have issues I'm willing to provide some help, within reason.

Contact me via twitter (@cofiem) or leave a comment if you're interested in buying. The total cost when I bought these was $1,840 all up (bought from Umart).

  • [Case] CoolerMaster RC-932-KKNI HAF Black Case (Bought for: $206.00)
  • [Memory] G Skill 6G(3x2G) DDR3 PC12800 9-9-9-24 F3-12800CL9T-6GBNQ (Bought for: $205.00).
  • [Fan] Noctua NH-U12P Special Edition SE2 (Bought for: $95.00.)
  • [DVD Drive] LiteON IHAS324SATA DVD-RW 24X Black Retail (Bought for: $33.00).
  • [Video Card] Sapphire HD5870 1G GDDR5 PCIE 2D HDMI DP (Bought for: $499.00.)
  • [Motherboard] Gigabyte GA-X58A-UD3R X58+ICH10R QPI 6.4GT/s DDR3 2000 PCI-Ex16 SATAII (Bought for: $249.00.)
  • [CPU] Intel Core i7 930 Processor LGA1366 2.8GHz 8MB Cache CPU (Bought for: $348.00.)
  • [Power] Corsair TX-850 ATX Power Supply 140mm fan (Bought for: $205.00.)

Australian government website - there's a lot!

Published
13 Mar 2011
Updated
13 Mar 2011

There are so many government websites. I really did not know there was so much information provided, nor that it was so segmented. It's nice that there's plenty of opportunity to find information. Here are some of the websites I'll probably find most useful, or I want to mention. In no particular order.

Government shopfront (Physical Presence) Locator
This could be quite useful. It only has Medicare and Centrelink locations on it right now, but it could include many more, like Ombudsman locations or emergency facilities.
MyChild
Information about child care and government financial matters. Also has a child care centre locator.
MySchool.edu.au
Financial and student information about schools around Australia. It's sites like these that make me wish I knew more about statistics. I'd love to get some raw stats and get some interesting facts and numbers. Don't get mixed up with MySchool.com.au
A - Z List of Government Sites
A necessity with the number of websites the govt has.
Genetically Modified Organisms - Field Trial Sites
Now this is interesting - a map of all the GM trial sites around Aust. They're all on the east coast. A bunch in west Victoria. There's a wide range of crops involved - Banana, Barley, Canola, Cotton, Grapevines, Indian mustard, Maize, Papaya, Perennial Ryegrass, Pineapple, Sugarcane, Tall Fescue, Torenia, Wheat, White clover.
Energy Star/Energy Rating
Confusingly, there are at least two sites for explaining energy ratings. Energy Rating seems much more up-to-date. Energy Star is focused on electronics. Energy ratings includes Clothes Dryers, Clothes Washers, Dishwashers, Televisions, Air Conditioners, Freezers.
Quarantine and Biosecurity Review
There are am ass of individual websites for reviews or once-off reports. Seems a little silly to give them their own website, when it would be easier to find and search for reviews and reports in one place. Always interesting to see the submissions.
Uncommon Lives
A National Archive of Australia (NAA) site recounting lives of people famous and not famous from the archives. Also check out the
Trove
Trove is a huge repository of media - books, letters, journals, photos, newspapers, acrhived websites... it is an awesome resource for research. And it only began mid 2009.
Understanding Money
Very useful tool. Yes, it certainly does seem like there's too much jargon and magic involved in finances. Might be useful, I haven't looked through the whole site.

Temporary User Profile solution

Published
17 Dec 2010
Updated
17 Dec 2010

Among the most frustrating (or crazily intriguing) problems are those that are almost like what is being talked about on forums or support websites, but either not close enough or do not respond to the recommended fixes. I think I fixed an issue just like this today.

Just like Grover's disease, there is no known (single) cause for why you might be logged onto a Windows computer and have a Temporary profile. You might get a popup from the task bar or an event logged in the Application Event Log. Possibly you may only notice because your desktop icons have gone, and in their place is a fresh, new profile. Most often, your settings, programs, icons and data files are still there, they just weren't loaded for you.

If you're lucky (sort of :\), you may be able to use a relatively straightforward method to resolve this. First, have a look in the Application Event Log, and see if there is a related event. Then have a look through the Microsoft Knowledge Base articles for something that seems right. Give it a go. If you get stuck on a step, or something doesn't match, don't just keep going. You could post on a forum, ask a tech-savvy friend or try out Super User Q & A.

If your issue, like mine, seems like it's not really covered, perhaps my solution will help you. Here were the symptoms:

  • A restricted user created solely for the purpose of running scheduled tasks did not seem to have a profile.
  • Every time the user "logged on" (i.e. the scheduled task ran), an new folder named TEMP was created under the C:\Users folder.
  • In the System Properties –> User Profiles –> Settings… profile list the user's profile was listed as Temporary status.
  • A warning was entered in the Application Event Log with a description similar to
    Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off.
  • When the user "logged off" (i.e. the scheduled task ended), the TEMP folder disappeared, as did the User Profile entry in the Profile list.
  • Looking in the registry, there were no {sid}.BAK entries in the ProfileList node.
  • There did not seem to be any way to stop the warning messages appear, or to create a profile for the user that lasted between logins

The way I got it working in the end was to go through a rather protracted process (for Windows 7/Vista/Server 2008).

  1. While the user is logged in. Make a copy of the TEMP folder. Name it with the user's username.
  2. Also while the user is logged in, use regedit to go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. Export the node matching the user with profile issues to a file. You can usually tell this based on the "ProfileImagePath".
  3. In the same location in the registry, export the node of a user that matches as closely as possible the user you are trying to fix.
  4. Edit the first file to match the second. Do not change "ProfileImagePath" or "Sid". The exact settings will depend on if the user is a domain user or local user, among other things.
  5. Wait until the user is logged off, and ensure that the user does not log in again while you are making the remaining changes.
  6. Merge the edited file back into the registry. Once merged, refresh the view, then open the new node. Change "ProfileImagePath" to match the path to the folder you copied from the TEMP profile folder earlier.
  7. Check the changes, then close regedit. Go to the User Profile list from System Properties and check that the user's Profile is listed, and has a Status of Local or Roaming. As long as it is listed, and is not Temporary, it should be good.
  8. When the user next logs on, there should be no warnings or popups, and they should be using a profile that will last between logins. The user should log out and in a couple of times to make sure.

Hope that helps, and as always with these things, no responsibility taken if things get messed up.

Javascript: Event order and calling methods on plugins

Published
17 Dec 2010
Updated
17 Dec 2010

It's been a busy week. The first couple of days were frustrating, tiring, and one-step-forward-one-step-back kind of days. The last few days have been much more productive, fun even! I thought it would be a good idea to record some of what I found in case I encounter it again, or other people do.

The first one is relatively straightforward. Essentially, when using Silverlight (and I imagine many other plugins) don't mix up your events! Silverlight allows so-called ScriptableMembers, which are accessible from javascript. However, depending on how your plugin works and whether you're using Flash, Silverlight, etc. there may be some built-in events. These are events like onReady, which fire when the plugin container has loaded. There may also be JavaScript-accessible events in your plugin. Be careful about the order and purpose they serve. The Silverlight plugin I'm working with has a custom onReady event. Calling custom methods or setting properties before the custom event fires may not work, as the plugin has loaded, but the custom content run by the plugin may not have loaded yet.

In Firefox, for example, you may see this error in the javascript console: Error calling method on NPObject!. This error is rather vague, and doesn't say much about what is going on. There is some information about it on the Mozilla developer site. In Flash this error can be due to security issues, such as those described in this StackOverflow question.

Desktop music programs

Published
21 Nov 2010
Updated
21 Nov 2010

For years, my favourite music player was Winamp. I used it from around version 2, up through version 3, and the jump to version 5. That was quite a while using one program, when there are any number of alternates available. I enjoyed the skins, and experimented with quite a few - even the "non-square" ones and the slide-out drawers. I spent some time with a relatively slow computer, and the speed of development slowed down. I went looking for a new music player.

Over the years I'd occasionally tried out other players - I learnt to loathe RealPlayer, and the way it messed up Windows even as it was installing. Windows Media Player just wasn't cool. I've tried out Songbird; I like that's based on the same technologies as Firefox, I like it's ideas. It always has one or two bugs that make it unusable for me. The first time round it was the lack of proper queuing functionality. I found an extension, but it crashed too much. The most recent try was foiled by a feature as simple as keeping track of the song in the playlist that is currently playing.

For a time I gave Linux a really good shot in the form of Ubuntu. It has improved in leaps and bounds in the last few years. To the point that I would genuinely use it as my OS, if I didn't play games. Using Steam, no less… The two main music players I used with Ubuntu were Rhythmbox and Amarok. Another widely-used player is banshee. All three are great music players: they include integrated web music services, plugins for various other features such as last.fm scrobbling, monitor your music folder, let you choose to automatically organise your music, and all the other standard features.

I've tried iTunes, and currently have it installed. I use it to automatically organise any new media I get. The "Automatically Add to iTunes" folder is useful. I'm really not a fan of the way it tries to take control. It wants to be the default program for all media types. Wants to organise media automatically without giving easy options to disable it. It also cannot handle ogg vorbis media files by default. Thankfully the same foundation that heads ogg vorbis development also produces components to let iTunes and other Apple products use ogg vorbis (audio) and theora (video).

My new favourite music player, and the program I seem to keep going back to, is foobar2000. I really wish it was open source, but apart from that, it does what is says, and does it well. It is supremely customisable and has plenty of extra components. I also has a resonable memory footprint.

Here are some of the features I use:

  • Global keyboard shortcuts (do not require foobar2000 to be focussed to be used) - I always assign 'Next Song' to Ctrl+Alt+Page Down.
  • Autoplaylists are a great way to gather the music that I want into a playlist dynamically. Among others, I have:
    • an all music playlist using query pattern %play_count% GREATER -1, sorted by %ALBUM ARTIST% - %DATE% - %ALBUM% - %PATH_SORT% - %DISCNUMBER% - %TRACKNUMBER% - %TITLE% (sort pattern source).
    • and a recently added playlist %added% DURING LAST 1 WEEK SORT DESCENDING BY %added%.
  • I'm also partial to the various visualisations - not colourful swirls - spectrogram, oscilloscope, peak meter, spectrum and VU meter.

Observations on developing for Android

Published
28 Oct 2010
Updated
28 Oct 2010

I'm a .Net developer for my day job, and even though I do have a couple of hobby projects in .Net, I'm usually more interested in using other technologies. That usually means some sort of web-related project. HTML, CSS, Javascript were my first taste of programming/development, and I still enjoy using them.

In the spirit of doing something different to work, my peek at Android development was enjoyable. Google has certainly gone to some trouble to integrate Android development heavily into the Eclipse IDE. And I'm glad they did, especially after reading some of the horror stories about trying to run and test a Windows Mobile emulator (not Windows Phone 7) and the early iPhone emulators. Overall, very good already, and improving.

The workflow is well constructed - use templates to quickly begin developing a new project. A brand new project with no changes can be run in the emulator (even though it's only a black screen with some "Hello World" text). Each time a project is run in debug mode, it's installed over the previous version, and started automatically. If the app is already running on the phone it can cause some troubles. A minor, and certainly avoidable, niggle.

Although I was surprised at the lack of a simple, useable .Net TimeSpan-like class in the Java framework, it was quite straight-forward to incorporate the Joda-time library. While I probably didn't need the whole thing, it functioned quite well, and was a good experiment. I did encounter a rather nasty Stackoverflow Exception that occurred when the time zone was not set. The solution was to set the time zone if it wasn't set. Joda-time is a thorough, complex library... it took me some time to work out.

Other Java-related issues involved superficial similarities with C# that actually functioned quite differently. For example, I regularly use switch statements with strings in C#, but apparently that can't be done in Java. It felt a little dirty resorting to if-else statements to get things done. Equality was also a sticking-point: in C#, even though by default == is used for object reference comparison, it is overloaded for all the built-in types to be much more useful content/structure comparison. In Java, it's pretty much .Equals to compare content, which felt a bit unnatural.

Developing for a mobile device has its own set of challenges, not least ensuring the UI remains responsive, and there are no memory leaks or power wasters. Android's convention is to use events as much as possible, which is very useful. I'm still not quite clear on some issues related to the Context object and memory leaks. Most of it was quite straight forward, and the Android documentation and references are well-written and usually thorough. There's always some small niggle that needs to be scratched using Google, though.

I might look into writing a more complex Android app soon - I need a bit of spare time, and that's not really available just now. I'm pushing to have time just to write this. Android is a rapidly-maturing platform, and hopefully it won't be held back by fragmentation or issues with Dalvik vs (Oracle's) Java.