First Windows 8 Metro Javascript Application

By Kenneth 'RabidDog' Clark at April 21, 2012 02:27
Filed Under: JavaScript, Code, Work

So having completed the tutorial found here http://msdn.microsoft.com/en-us/library/windows/apps/br211385.aspx kindly provided by Microsoft, I have to admit that I am a little concerned.

 

Firstly the tutorial is merely a walk through on modifying code that has been generated by a project template. The descriptions on what you are doing are weak and lack any beef as to what is going on under the hood. Perhaps there isn’t much going on but I would have preferred a closer look at the WinJS library that seems to be so prevalent, or perhaps even a link to it? (Little digging and I found this http://msdn.microsoft.com/en-us/library/windows/apps/br229773.aspx)

 

The next thing worrying me is that we are all aware how notorious Microsoft is when it comes to being standards compliant (although this seems to be coming right with the new Internet Explorers). Looking at the JavaScript they have implemented in this relatively simple example led me to wonder what the story is with JQuery. Why was JQuery not included as the mechanism to manipulate the DOM? Perhaps it was because it is a project outside Microsoft’s control? That being said, wouldn’t this have been a really good opportunity to get involved with the project? By doing that you can influence development to fit in line with what you got planned.

 

On the plus side, I think it is pretty cool that the apps written in HTML and JavaScript can run in a “full scream” mode and not in the nasty looking local browser. This allows people to develop competitive applications with out having to delve into the WPF side of things. It also mean the idea of an offline web application is going to become a reality. I wouldn’t be surprised if we start seeing websites you can install on your Windows 8 machine.

 

The other nasty I picked up is that the HTML and CSS are Microsoft Internet Explorer specific. I suppose this is their prerogative considering they own the operating system. Again I like the fact that Microsoft is challenging our way of thinking and interfacing with our computers and by virtue of the fact that I work for an innovation company I am looking forward to seeing how we can apply our creative, forward thinking to this new canvas!

 

Having said that I see the Windows 8 CP has just downloaded updates LOL

Windows 8 CP Review

By Kenneth 'RabidDog' Clark at April 17, 2012 15:07
Filed Under: Work

First thing I do is fire up VMWare and load the ISO. So while booting I get this funky fish and then all of a sudden I get this:

Windows8

 

Chuckle chuckle, blue screen, been a while since I seen one of these. Anyone else notice that arb unhappy face? What the heck is that about? Getting reminders of Microsoft Bob anyone?

 

Right, sitting and fiddling with some settings didn’t seem to resolve this so I hit google. Seems that VMWare 7.1.x doesn’t support Windows 8 but VMWare 8.x does. Go figure, now I have to upgrade my VMWare Workstation.

 

So before getting to excited I decided to try what everyone else was having a significant amount of success with, VirtualBox. So I downloaded version 4.1.12 for Windows hosts from https://www.virtualbox.org/wiki/Downloads.

 

Right on! Download the package, installed it and away we go! Windows 8 installed with no problem. The usual process of inserting your key, applying your settings etc is still applicable in the installation process but seems relatively smooth.

 

So all in all the installation was pretty simple. Navigating around the operating system is interesting to say the least. The CP is still a bit flaky but that is to be expected. I do believe that there are going to be a significant amount of rants concerning the new navigation techniques both on the Metro UI and the desktop.

 

Me personally, I am looking forward to the shift in thinking.

More fun with Jasmine, Sinon and JavaScript

By Kenneth 'RabidDog' Clark at January 26, 2012 22:48
Filed Under: Code, JavaScript, Test Driven Development

Once again delving into front end JavaScript development (which I might add is not all that fun Sad smile) I have started to gather a few tid bits on good sites to have a look at. Before I post that I want to make a few points on the whole JavaScript world and why I find it to be so annoying to work with.

 

A few general trends I have noticed in the web development world is that the idea of using solid architectural practises is often undermined by the need for fancy front end user experiences. This leads to a very dangerous situation were we sacrifice the integrity of backend services to facilitate fancy front end experiences. This being said, I must admit, that I do like the trend developing in the JavaScript development community to implement test cases. Lets hope this trend continues!

 

The one thing that really, and I mean REALLY, frustrates me around the JavaScript language is the lack of structure. While this might be a plus for some people, it is highly frustrating me. Why has the ECMA specification not allowed for a simple import function? All other major platforms and languages allow you to import reference files. Yes, I know you can merge them, minify them and then wrap them in cheese but why should you have to? I know that this decreases HTTP traffic in certain instances but it is a pain in the rectum to develop for. Some sort of import directive is long over due in JavaScript. Why should my HTML pages contain script reference tags? This doesn’t fit in with the view knowing nothing about the application layer. With unobtrusive JavaScript becoming big this is a serious flaw in the design. I know there are ways to get round all this but all mechanism involving referencing files is contrived.

 

That single word sums up my feelings on JavaScript development, it is contrived. That an the lack of support by any major IDEs is also painful. Yes, you should know how to do this without the help of an IDE but that is like telling a dentist to use a handle drill because an electric drill is too helpful.

 

The lack of standards regarding engineering practises in JavaScript, the custom JavaScript engines found in all major browsers and a few other things still make JavaScript development a “dark art”. I take my hat off to good, productive JavaScript developers, you guys truly have a gift. I am also left wondering who long it will be before JavaScript grows up.

 

Anyways if you looking to get into the whole JavaScript TDD and MVC boat I would highly recommend that you check out a fantastic set of write ups by Jim Newbery over at tinnedfruit.com.

 

http://tinnedfruit.com/2011/03/03/testing-backbone-apps-with-jasmine-sinon.html

 

Well here is to JavaScript growing up!

Time management and the call of procrastination

By Kenneth 'RabidDog' Clark at December 29, 2011 13:23
Filed Under: Work, Personal

Today I was feeling all flustered and had no idea why. It felt like I had stacks of work to do and didn’t know where to begin. Then half way trying to do something I felt like I had been working for hours on the same thing.

 

I took a step back and remembered a technique our scrum master has taught us called the Pomodoro technique. Yes I know it is old but I thought I would try it again. Now like any true geek I had to find an application that could do the timing (I know you can use any clock but I wanted a history of tasks done).

 

So I found a really cool Adobe Air application which has been developed free. http://code.google.com/p/pomodairo/. If you are one of the unfortunate Apple Mac users Winking smile a friend of mine uses http://pomodoro.ugolandini.com/

 

 

If you interested in reading more about the technic have a glance at http://www.pomodorotechnique.com/

 

Happy days!

Windows 7 Desktop helpers

By Kenneth 'RabidDog' Clark at December 15, 2011 11:48
Filed Under: Open Source, Personal

This morning I went on a mission to organise my desktop icons. I usually try and sort them logically but it appears that in my old age and perhaps an element of laziness is causing my desktop to become, shall we say, uncontrollable?

 

Fiddling with Ubuntu last night I noticed how the unity interface groups icons for you. So I wondered if anything like that existed for windows and guess what, something very similar does indeed exist. Check out http://www.stardock.com/products/fences/ and smile. My desktop went from a cluttered in cohesive, speed valuable time isolating shortcuts and links to this:

 

mydesktop

 

 

Nice and neat, structured, just the way I like it. This is a custom layout and you too can now have this power!

 

Then comes the inevitable question of multiple desktops. Well again, the only decent on I have found is a product called Dexpot which can be found here http://dexpot.de/index.php?lang=en. Still absurd how Microsoft hasn’t built this into their OS.

TOGAF Level 1 Examination

By Kenneth 'RabidDog' Clark at December 14, 2011 22:31
Filed Under: Architecture, Work

 

It has been a long time coming. I put it off for way to long and then the expiration of the exam voucher started creeping up so a few weeks ago I decided to book the exam date and get on with it.

 

I will not lie, the stress levels were high. I found a few resources regarding revision and the best ways to prepare for the exam. I also found a significant number of practices test kindly provided by people also studying for the exam.

 

So I decided to adopt my own study still of notes and testing myself. The day before the exam my office was kind enough to give me the day off and I spent it behind the books. After a full 9 hours of studying (yes with breaks between) I went to Systema to blow off a bit of steam. I then arrived home, did some more revision, hit the XBox 360 for an hour and finished the revision.

 

This morning I headed out early and arrived at the exam center 40 minutes early. This allowed me another look at my revision cheat sheet before doing the exam.

 

Going upstairs I was greeted with some nervous faces also writing their exams. After waiting for everyone to arrive we sat down and began the process of registering and opening the test which comprised of 40 multiple choice questions.

 

I started the test and 15 minutes later was finished. Not to brag but I figured that if I didn’t know it, reading the questions over and over wasn’t going to help. So I answered the questions and waited for the results. by God’s grace alone I passed!

 

So now on to level 2!

Ubuntu 11.10 updgrade black screen

By Kenneth 'RabidDog' Clark at November 29, 2011 19:53
Filed Under: Linux

If you decided you wanted to upgrade your Ubuntu you might end up in a situation where you get a black screen and nothing after.

 

After search the net I found this article

 

http://uksysadmin.wordpress.com/2011/10/14/upgrade-to-ubuntu-11-10-problem-waiting-for-network-configuration-then-black-screen-solution/

 

Which basically stipulates you do this

1.Hit Ctrl+Alt+F1 at the blank screen to get you to a non-X terminal (tty1)
2.Login in with your username and password
3.Change to root with: sudo -i and enter your password
4.mkdir -p /run /run/lock
5.rm -rf /var/run /var/lock
6.ln -s /run /var
7.ln -s /run/lock /var
8.reboot

 

Problem with this is that you can’t get the tty1 so boot into single user mode and follow the instructions from point 2 and it will be up and running again. Thanks to the initial author.

Google+ C# client

By Kenneth 'RabidDog' Clark at November 10, 2011 23:57
Filed Under: C#, Code, Web

After the hackathon, I noticed that the .NET realm is not covered by the current Google+ clients. This prompted me to write a client to facilitate the current APIs. It is strongly typed, easy to use and pretty handy. I have included basic tests to describe it’s usage. Currently it only supports the API Key. Next is the paging and OAuth 2. Check it out if you get a chance https://github.com/RabidDog/GooglePlusNet

 

Ciao

C# HttpWebRequest and HttpWebResponse

By Kenneth 'RabidDog' Clark at November 09, 2011 13:34
Filed Under: C#, Code, Web

 

Another quick post on doing a simple http request and processing the response. Working on the Google+ client for C# and due to the fact the API is REST based, I need to be able to make an HTTP request and process the HTTP response. When looking at the client I am implementing I decided to wrap the whole round trip into a single operation. Here is the results of my labor.

 

First let me give you the class definition:

 

using System;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Text;

namespace CodeShark.Communication
{
    class HttpProcessing
    {
        public static String ProcessRequest(string requestUrl)
        {
            // This will be the raw string response
            String output;

            var httpWebRequest = (HttpWebRequest)WebRequest.Create(requestUrl);
            httpWebRequest.MaximumAutomaticRedirections = 4;
            httpWebRequest.MaximumResponseHeadersLength = 4;

            httpWebRequest.Credentials = CredentialCache.DefaultCredentials;

            using (var httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse())
            {

                Debug.WriteLine("Content length is {0}", httpWebResponse.ContentLength);
                Debug.WriteLine("Content type is {0}", httpWebResponse.ContentType);

                using (var responseStream = httpWebResponse.GetResponseStream())
                {
                    if(responseStream == null)
                        throw new InvalidDataException("Could not retrieve any data from the URL " + requestUrl);


                    var readStream = new StreamReader(responseStream, Encoding.UTF8);

                    output = readStream.ReadToEnd();

                    Debug.WriteLine("Response stream received.");
                    Debug.WriteLine(output);
                }
            }

            return output;
        }
    }
}
Now for a quick explanation. We create the HTTP request using the URL supplied. Then we set some limits on the bouncing the HTTP request can do and set the credentials. The request is fired off when we call the httpWebRequest.GetResponse(). Once we have the HttpWebResponse we need to read the response stream. We get the response stream by calling httpWebResponse.GetResponseStream(). Using this stream you can read the response (presumably text). Pretty simple, nothing to fancy but something we do quiet often without even knowing it.

Build now, make money later

By Kenneth 'RabidDog' Clark at November 09, 2011 10:31
Filed Under: Code, Work

After reading an interesting piece of market research around the general idea and reasons for building mobile applications, everyone always pointed out the fact that they wanted to make money off their applications, so I thought I would make an observation about it.

 

Firstly, money is needed. We need it to pay the bills, we need it survive, to remain clothed and to have a roof over our heads. There is definitely a very real need for money, I am not denying this. However if we look at successful online software products, very few of them first set out to make money. Their first goal was to attract a user base.

 

At the recent G|South Africa (Google South Africa) days, the key note speaker went a little into the methods that Google uses when building applications. He pointed out that the when presenting an idea, the last thing Google wants to hear is how you going to make money off it. The first thing they tell you to do is to get the users!

 

Why is this important? Well it is pretty simple really. If you don’t have people using your application, you won’t ever make money off it. If people cannot use the application without risk they won’t try it. Especially at the rate that applications are being released and the substandard quality of the product. I am incline to believe that the Apple App store is doing better just by virtue of the fact that people know they have quiet a rigorous quality assurance procedure.

 

So my advice to you is pretty much the same as Google’s. Build the application first. Release it for free, get the user base, then and only then try to figure out how to make money off it.

 

Just another point on the inability to monetize applications in South Africa through the Android Market. South Africa has some of the nastiest monetary policies in the world. Look how long it took us to get PayPal. So it is not because Google is not interested in South Africa, it is just incredible difficult to establish the mechanisms in South Africa.



I am South African. Always have been always will be. I love my country. I love my wife and two children.


I also really enjoy solving problems. I currently work as a Software Architect exploring new solutions for business problems. Having been round the block a few times I enjoy showing new developers how best to solve problems, how to find answers and how to approach solution development.


In my spare time I enjoy riding my super bike, training in Systema and horsing around with my family.


Month List

Visitors

Twitter Feed

17. May 17:12
@UnexpectedPippa only 3? "Don't touch me on my studio!"

17. May 17:12
@SaartjieJoan if you look around you might see many forks hanging out of eye sockets

17. May 17:09
@SaartjieJoan That truly is amazing HAHAHAHA!

17. May 14:42
RT @AzuroTalent: Wanted:#QA specialists(3) to join dynamic company in #Jhb. Pref Skills: #TFS 2008 #K2 #SQL Server and ISTQB Cert - 2+yr ...