Sunday, July 25, 2010

Windows Auto-Updaters

If anyone from Microsoft reads this I have a pretty simple feature request for Windows 8. Windows desperately needs some for of auto-update api. On my current Win7 install right now I have this situation:

Chrome: has their own updater

Firefox: has their own updater

Winamp: has their own updater

Flash: has their own updater

Digsby: has it’s own updater

iTunes: has their own updater

… etc.

 

Aside from all these programs requiring memory resident services in order to maintain the periodic update check the main annoyance is that each of these updates bug you at different times through a different interface about the programs they know about.

Since updating and patching for security flaws is a common thing in the modern application world this would be a big benefit to users of Microsoft products if there’s a centralized way of alerting the user of new changes. If it could be listed along with the standard windows update interface all the better (maybe a third party applications section).

I would submit to Microsoft directly but it doesn’t appear they have a feature request page in a casual search of the Microsoft Windows divisions site.

Wednesday, July 14, 2010

Reading Android XML Resources

I’ve been playing recently with some Android development and recently I needed to load an XML resource (for API 3). I was very surprised to find that Android doesn’t have a super easy way of loading XML resource files.

The XMLPullParser works but it’s very bare metal and does leave quite a bit to be desired. So I decided to go ahead and create a generic XML parser that all android developers can use (and improve).




public class XMLData {
    public String mValue;
    public XMLData mParent;
    public List mChild;
   
    public XMLData(String value, XMLData parent) {
        mParent = parent;
        mChild = new ArrayList();
        mValue = value;
    }
}   



First we establish a base XML data structure I decided to keep things simple here so I'm not at all doing anything about attributes if you wish to handle attributes you need to add a new ArrayList for attributes.

Now that we have our basic XML data type we can start create a class to read it:


    public static XMLData Load(XmlPullParser parser) {
        XMLData xmlModel = null;
        XMLData currentNode = null;
       
        try
        {
            int eventType = parser.getEventType();
           
            while (eventType != XmlPullParser.END_DOCUMENT){
                String name = null;
                    switch (eventType)    {
                        case XmlPullParser.START_DOCUMENT:
                            xmlModel = new XMLData("root", null);
                            currentNode = xmlModel;
                            break;
                        case XmlPullParser.START_TAG:
                            name = parser.getName();
                           
                            if (name != null) {
                                XMLData dataNode = new XMLData(name, currentNode);
                                currentNode.mChild.add(dataNode);
                                currentNode = dataNode;
                            }
                            break;
                           
                        case XmlPullParser.TEXT:
                            name = parser.getText();
                           
                            if (name != null) {
                                XMLData fieldNode = new XMLData(name,currentNode);
                                currentNode.mChild.add(fieldNode);
                            }
                            break;
                           
                        case XmlPullParser.END_TAG:
                            name = parser.getName();
                           
                            currentNode = currentNode.mParent;
                            break;
                    }
                   
                    eventType = parser.next();
            }
        } catch (XmlPullParserException e) {
            Log.e("ParseEx", e.getMessage());
        } catch (IOException e) {
            Log.e("IOEx", e.getMessage());
        }
       

        return xmlModel;
    }



So let's back up for a second and look at what this does. We start off by first executing:

int eventType = parser.getEventType();

This reads off our first tag for the XMLPullParser.what follows is the main while loop.

There are 4 Major event types we are concerned with:

XmlPullParser.START_DOCUMENT
XmlPullParser.END_DOCUMENT
XmlPullParser.START_TAG
XmlPullParser.END_TAG
XmlPullParser.TEXT

START_DOCUMENT and END_DOCUMENT denote the beginning and end of the document when we get a start we concern ourselves with initializing the XMLData so we can start to build an XML tree.

START_TAG and END_TAG denote when each of the tags expand. On a START_TAG we prepare ourselves to traverse into the ENTRY by creating a new XMLData.


 case XmlPullParser.START_TAG:
             name = parser.getName();
                            
             if (name != null) {
                XMLData dataNode = new XMLData(name, currentNode);
                currentNode.mChild.add(dataNode);
                currentNode = dataNode;
             }
             break;



dataNode in this case is the newly created node ready for traversal. We then perform currentNode = dataNode remember that we are now traversing down the node.

On END_TAG we do one and only one thing we go up one level from our tree structure. This is accomplished with the following code:


         case XmlPullParser.END_TAG:
            name = parser.getName();
                           
            currentNode = currentNode.mParent;
            break;



Finally we have TEXT in which we read off the actuall data of an element:


     case XmlPullParser.TEXT:
         name = parser.getText();

                   
         if (name != null) { 

             XMLData fieldNode = new XMLData(name,currentNode);
             currentNode.mChild.add(fieldNode);
         }
         break;




Hopefully this tutorial breaks down an easy way to access your XML data. If you want to use XMLData right away you can grab it here! I haven't decided what license I'll release it under but I'm thinking it'll be under the same license as Google SDK.

DOWNLOAD SOURCE

Monday, June 28, 2010

iTunesMonitor 2.5 (Update)



I've recently updated iTunesMonitor to 2.5 status you can find the original description here (The download link was updated there as well).

The main difference is it now respects Windows 7's UAC controls so no more crashing due to permission issues. Keep in mind you will need .NET framework 4 to run this now.

Among other nice features 2.5 iTunesMonitor finally gives iTunes the ability to work with your media keys even when iTunes does not have focus for those die hard iTunes users.

The system is "install free" meaning as long as you have iTunes installed detection and launching is automatic.

Download iTunesMonitor 2.5

Saturday, June 26, 2010

On the streets of G20

G20 started getting dangerously close to my house so I decided I should see if there was any immediate danger. Well I’m not going to caption but here’s what it looks like on the streets.
HPIM6537 HPIM6547HPIM6548
HPIM6551






As tensions build the police fire rubber bullets into the crowd you can spot a rubber bullet near the end of this video.







After firing the rubber bullets the crowd gets rowdy and pushes back.

HPIM6564

And as soon as the cops back off the Hooligans camouflaged into the rest of the crowd set fire to yet another police cruiser.

HPIM6565 HPIM6567 HPIM6575 HPIM6576 HPIM6577 HPIM6581

You can all make up your own captions about the event it should be somewhat self explanatory.
I’ll make it clear that I don’t support the actions of the violent protesters the peaceful ones were around but they’ve been largely overshadowed by the few violent ones.

Monday, May 17, 2010

Learning Unity a Beginner's Prespective

First I should probably give everyone a little background. I'm a Programmer by trade not an artist so I approach things from a programming standpoint. Me and a friend of mine recently decided that we would like to make an attempt at producing an indie game title.

After some of the ground work had been established we decided that it's would be an appropriate time to take a look at some toolkits. The Unity Game Engine has been recieving a lot of praise from the indie crowd recently. I felt it was appropriate to at least give it a fair evaluation.

Arriving from a programmer's background the first thing one would notice is that Unity is built somewhere in between the artist and programmer tools. Although I would place unity more heavily towards the artist side of the game development. The first hurdle a programmer will find is that a lot of the terminology is geared towards the artist so it may be hard to figure out what "bones" are or the concept of a "scene" is.

Once you get beyond that and start your own project you find another lacking area of Unity the tutorials seem to span. "This is the UI" and "Here's an advanced tutorial that we expect you to know how to use the toolkit well" but nothing in between. What I was looking for as a coder is "this is your first unity level" but there really wasn't any tutorial that ran you through creating a box with the player in it and giving it some basic lighting.

In this area unit could be improved upon. If the tutorial exists then it really wasn't made that clear where you could go and find it.

As a programmer game development for us works as follows. Build Rough Game Mechanic concept --> Make ugly place holder graphics --> Test game concepts --> Refine and acquire final art assets. Unity however doesn't work this way. Any object you want to put into Unity must be first drawn in your 3D modeller package. Unity does not include any form of "primatives" you can just drop in. This basic disconnect forces people used to the programming model to adhere to the unity work flow model of: Build rough art assets --> Drop into unity --> Attach scripts --> Test gameplay --> Refine models.

Admittedly to non artists this model can seem Alien often times we use code to compensate for the fact that we don't understand how to use all the features of the complex 3D modelling packages such as rigging, bones, mesh deformation, and particle effects.

Overall though for a first look Unity may seem baffling at first but I can definitely see signs that once you get a hold of how to appropriately utilize the tools unity definitely seems to speed up the "concept / code / test" cycle we are used to. I only caution the programmers about to be introduced to this tool to be cautious and be aware that when they first start they will be baffled in what appears to be a tool designed for artists.

Flash programmers would be well aware of this concept that the editor doesn't assist the coders instead it's somewhat expected the coders use their own coding environments to get the job done.

Mass Exodus of Facebook

It's interesting from a long ago Facebook quitter to observe this new mass exodus that is now occurring. 4 Months ago me and my group of friends discussed privacy concerns over Facebook and since then deactivated our accounts.

It would seem that the world is catching up to our tech savvy movement. Recently in the last few weeks the Internet has been in an uproar about privacy concerns over Facebook. Facebook has introduced a service that allows you to be logged in to share data over various services. Once again like all Facebook introductions everything is defaulted to public for their entire network.

As the patterns build up it seems to all point to what me and my friends assumed 4 months ago. Facebook it would appear doesn't really care about privacy and will never learn from their mistakes. The act of opening all your personal information to the public is not a mistake so much as a conscious business strategy. It is very much to Facebook's benefit to make all your information public. As such they will continue to try and open up every last piece of data you put on it until you finally delete your account.

Thursday, May 06, 2010

Best RC I've seen today

Ok it might not fly well but I love it anyways.





And here's a star fighter from my child hood video game "descent" the Pyro GX




This one is impressively detailed (can't tell if it's the same one) but hats off to the builder he really made this one shine


Tuesday, April 06, 2010

Vesaero Maiden

The first Maiden flight went somewhat bad I realized too late that the prop I was using is too big for the motor and the plane come down with a lot of smoke.

However if you want to check out the brief flight video I have it here.

Early impressions are the plane flies rather well it does some really hard banking turns it definitely follows the “super maneuverability” design of the initial concept.

With enough power these hard banks won’t be a problem the plane does exhibit some pitch up tendencies at higher speeds which will need to be examined.

Thursday, April 01, 2010

PS3 Firmware 3.21 Update Process Impressions

Like may people out there I was a bit disappointed when I heard that firmware 3.21’s only feature was the removal of Linux. I used it from time to time but I will admit it was not in steady use on my system for day to day operations.

That said I disagreed heavily with Sony’s underhanded approach of removing features that were obviously advertised on the side of the box my unit came in.

This is not about Sony’s update decision however there are plenty of posts on the internet about that, this is about the update process.

First off if you have another OS installed before you update you are required for format your HDD. Formatting your HDD removes all user settings, saved games, movies, music and photos you’ve loaded on. For me that’s 60GB.

I looked around for a “Just delete Other OS partition and resize” option but alas there was none.

Any sane user at this point would offload the data to a backup hard drive. So I went to the backup utility and selected backup to external HDD. This is where Sony’s lack of care for this release is made obvious the backup will take 2 hours to complete. I’m guessing since I’m in the middle of it that the restore will also take 2 hours.

4 Hours for a firmware update is by far the worst customer experience ever. I’m sure I’m not the only one that’s greatly disappointed in Sony for this.

It would’ve been possible to just wipe the OTHER OS partition and expand the main partition without losing user data. But no, Sony decided that he customer’s time is not really worth anything.

A very poor rollout Sony as much as I’m usually negative about Apple, their iphone and ipod releases are done far better. Major releases although they wipe your phone, automatically make sure everything is back the way you left it before the update is done.

In order to ease customer suffering Sony could’ve also implemented a prompt to insert an external HDD and have the user data reloaded when the update was complete. But to be honest a simple delete partition and resize main partition would have been much more effective and much faster.

Take note people this is NOT how to update consumer devices.

Monday, March 29, 2010

Vesaero Plans

Some of you have expressed interest in these plans. I am planning on open sourcing these plans. Standard Creative Commons license applies.

I haven’t planned initially to open source the project so these plans will come up slowly as I have time to digitize and plan out how to best present them to you for building.

Vasaero-Wing

first up is the primary wing. Measurements are in CM. My plane is scaled up with a factor of 4.7. That means that to obtain the full scale wingspan you take 15cm as listed in the diagram and multiply by 4.7 to obtain 70.5cm (15 x 4.7 = 70.5cm).

To get the angled wings you will need to use the wing scaffolds during build while gluing to obtain the correct angle on each wing. Cut each bend leaving a tiny bit of material then fold back to expose a gap. Use the scaffolds to obtain the correct angle of the gap then fill the gap with hot glue.

The vertical stabilizers (v-tail) I created ad-hoc but I’ll try and digitize a version here as well.

Sunday, March 28, 2010

Vesaero Post Flight Test 1 Modifications

HPIM6378

Lol I had a duh moment. The Vesaero is designed to look like a jet I should’ve clued in that that means it will also fly like a jet. First flights have shown that the Vesaero has an average cruise speed of 50 km/h. This is a tad high for a beginner with zero flight experience.

There are also some minor flight issues as well. For one the plane has a nasty habit of stalling once you get down to 10 km/h speeds. Flaps alone don’t seem to provide enough lift.

The dihedral which doesn’t look like a lot ended up being a very obvious flight characteristic the plane loves to self-right itself in flight. although this is great for the beginner I can see how more advanced pilots would struggle to keep a plane like this on knife edge. The intension however was never to build the plane for knife-edge moves so this wasn’t a bit surprise.

The position of the v-tails also puts the v-tail at risk of deep-stalling. A condition that is common to planes with controls surfaces that could be blocked by the wing during high angles of attack.


524px-Deep_stall


The Final design oversight has to do with super maneuverability. Saying Vesaero is agile is an understatement. Vasaero’s wing design and CG is modeled after an 3D helicopter. It’s CG balance point is located exactly where the cord of the wing is the thickest. Designing the plane this way makes the plane very easy to pitch, as well as roll.

The plane is super maneuverable in that too much pitch input from the pilot will cause the plane to “over-G” and over AoA quickly rapidly bleeding off airspeed without warning until stall is achieved. In this respect Vesaero handles very much like a Su-37 when they do the mid-air flips.

The key difference is the Su-37 and all other modern jets have a thrust to weight ratio of over 1.06:1 the best I can estimate my jet is only producing a power to weight of around 0.6:1 which puts it in line with jets of yester-year like the F-4 phantom.

All most of this means is that the plane is more capable than the pilot can currently handle so I’m putting in some modifications to make it behave more like a glider and less like a jet.

HPIM6386

HPIM6387

In order to slow down the jet I realized that I needed to decrease wing loading in order to increase “float”. I’ve tapped on removable wing extensions for this purpose. The wing extensions serve to double the length of the wing adding to the lifting surface. Care has been taken to maintain the proper CG even with the extension. The new body to wing ratio is now ~0.5:1 (almost double wingspan to body length).

Also after the first few test flights I noticed that just foam on the control horns was starting to wear out so these have also been improved to be much more rigid by adding plastic reinforcement members.

HPIM6388

HPIM6389

The new servo arrangement has RC helicopter like levels of rigidity and should help control the plane a lot snappier.

One minor consideration that needs to be tested in this new setup is the trainer wings add a lot of wing-span but fail to move the aileron controls out more this could lead to decreased control in roll.

In terms of damage resistance the airframe is very resistant to damages the V-tails clear the ground making hitting them during a crash near impossible. The nose cone is double reinforced and designed to deform a very severe crash had the plane drop nose first 3 stories straight into the ground the nose was easily repaired after. The modular design of the nose cone has also seen very nice crash repair characteristics. Often time only 1 or 2 panels need to be re-cut from foam for the repair but not all of them.

Overall I’m pretty happy with the design the one thing that needs to be improved is the power plant it feels somewhat underpowered to be able to call itself a jet. I also definitely need a much wider space to test it in the future as this plane likes to go fast.

Hobbies

I need new hobbies. Two years into COVID-19 my hobby became everything COVID related everything from keeping up with the latest restriction...