Activating Win8

Posted: August 16, 2012 in Win8
Tags: , , ,

I was having trouble activating the Win 8 version I downloaded from TechNet, when I tried to activate, it would fail saying that it could not find the DNS, or something similar to that, so after doing some research, here is the solution I found.

  • Right click at the bottom left of you screen;
  • Click the “Command Prompt (admin)” option;
  • Once the prompt opens do the following:
    • slmgr.vbs –ipk <Product Key>
    • Then hit enter;
    • Now type:
      • slmgr.vbs –ato

That’s it, the magic is done

Keep coding.


Woke up last Wednesday to the news that Microsoft was reinventing its certification program , not necessarily news for me since a while back I had the chance to influence some of the changes that are happening. I was happy to see names like MCSD, and MCSE coming back since I hold certifications since 2004 and I use to have MCSD and I liked it, it was well known by the community and well accepted and respected.

But the questions are; Why the change? Why now? and… Why MCSD again? Well here is what I think the answers are.

Why the change? Why now? Why MCSD again?

 

With the investment that MS and other companies are doing in the “cloud”, we need the incorporation of those skills in the certification program, and that is being done as I write this post, example are certifications like 70-583, or 70-247 for IT Pros. This will allow the market to pin point the professionals they need, as they make there ways into this cloud world.

So the market needed the target on the back of the professionals, and they will have that, but why MCSD? Well I think this name was around for a while and people where confortable with it, they understood the idea, in the same way I described in the opening, MCSD was a brand, I was associated with, and it was a big seller of my skills, and interestingly enough it still is, even after it was discontinued with the MCPD remodel, and I believe bringing “Sexy back” is always a good idea.

What are the changes?

 

There is constant attempt to create a certification process and path, that allows, what I like to call, “Bucketing”. Basically the idea, is to separate professionals in buckets of skills, so the market can look in the right place for what they need, instead of just fishing on open seas. The buckets are now separated in 3 levels.

  • Associate – Microsoft Certified Solutions Associate (MCSA);
    • This is the foundation level, every certified professional starts here, they will have the proof for specific technologies, making it a prerequisite for the MCSE;
  • Expert – Microsoft Certified Solutions Expert (MCSE) or Microsoft Certified Solution Developer (MCSD);
    • This are for professional with deeper knowledge in many technologies, they will be leader, or mentors in the move to the cloud;
  • Master – Microsoft Certified Solutions Master (MCSM);
    • This are a select few that hold the highest bar of knowledge;

 

Well with all that said, where do get more, and the answer is simple, MS Learning, and also why should you care, lets say, that there 14 millions of reasons.

So what you waiting for?

Keep learning, keep coding.


Microsoft certification has been around for 20 years, its success is greatly owed to the rigor to which each certification goes through during its creation.

This process, for those of familiar with development, is very similar to any software design. Initially they gather information about what the certification is going to test, then they find resources, and by that I mean, they find professionals that are experts in what is being tested, and they get them to design the questions, while signing a “No Disclosure Agreement” (NDA), to guarantee secrecy of the questions, consequently guaranteeing quality of the test.

Once they have enough questions they start a refinement process where they go through each question and polish them to make them precise and to the point, this can take a little while, and focus groups are put together to brainstorm towards reaching the goal.

After the refinement is done, and they have a set of questions that seem to be alright, they have to go to the wild and make sure it will survive the experienced professionals out there, so they launch a beta test, that is usually longer in quantity and time to accomplish it. This beta test is taken by people that are already certified in other technologies, and it is hardened and refined even further, through evaluations of how well questions are being answered and comments done by the first tester.

Although this process is long, its an attempt to make a test that verify that any professional that has passed is indeed qualified in the technology in question, and is capable of execution of the same. This creates an appreciation and trustworthiness by companies that are hiring, and allow an easier selection as well.

Keep learning, keep coding.


In this business, if you have a notepad, an idea, and some will power , you can be a software developer. But not necessarily a good one. So if you are trying to hire, there are only so many ways you can trim curriculums from a pool in an attempt to get the best programmer, certifications are one of the tools available.

Certifications not only show the person has the knowledge, but they can show the character of a person, since it takes discipline and lots of hard work to accomplish it, and he is also willing to take an extra step to be different. It can help you to track the interest of a person in new technologies, as they are coming out Microsoft Learning is also developing the trainings and certifications that go along with them, allow people to learn about the new and certify on it.

Today as a developer you can take certification like 70-583: PRO: Designing and Developing Windows Azure Applications , that represents you ability to architect and design application for the all new cloud, or 70-599: Pro: Designing and Developing Windows Phone Applications , that show your skill in developing for Windows Phone. This is a powerful thing, the person selecting you, now has that little extra knowledge about you that might make you the one, the all mighty developer, that can solve his problem.

So lets make a deal, you will start with one, go now to Microsoft Learning pick a test, go to one of the test providers like Prometric , schedule your test, and get it going. Then when you pass, contact me telling about your success. I would love to know what you thought of it, and how you think it improved your career.

Keep your self up to date, keep your self employable, keep coding.


Creating the UI

 

This is going to be another trial and error like everything else. What I want is to get something modern, expressive and obviously user friendly. I will be doing some mock-ups and will see how you guys feel about it.

The Basic Look

 

Site Layout Basic

In this mock-up I took a pretty common approach where we have the navigation bar on top, and that will be persisted through out the website, independent of the content.

The content area with contrasting colors, between the background and the actual centered content.

Finally the footer where we could links to profiles of the creators, general contact information, powered by links, etc..

The Metro Look

 

Mock-up 1

Site Layout Metro 1.

Mock-up 2

Site Layout Metro 2

Following the trend we have for this year, the Metro style basically uses big fonts, little written information with icon compensation, which tries to catch user attention by simple graphs with a lot of meaning, also making it easier for touch devices, since this “Tiles”, are big enough.

The grouping are just a simple way of bunching together different categories of “Tiles”, so in the examples above we have news from different sources and social links.

The key difference between the 2 samples, is the lack of a footer in mock-up 2, this is closer to what Metro style, since there is less information on the screen, making it cleaner.

In terms of functionality we maintained the navigation bar at the top, and like the basic mock-up, it will stay independent of the content.

The content area, which includes, the “Tiles”, and the grey bar with “.NET Association”, has horizontal scrolling giving the panorama idea. Depending where you are on the website, the Text, in the header will change appropriately.

Also in blue, there is sub menu that would help you jump to the other categories within the “Panorama”

The content are could also have areas with a vertical scrolling for example, if we had a long article. That content would still respect the boundaries of the area though.

Overall, this is a much cleaner solution but is very different from what a lot of users a used too, so in some ways it could be a bold move. As we build up the website we would be updating with the newer features, and new sections would be created as necessary.

Once more, I will be updating this article when I have more decisions and/or information.

Keep Coding

The Past : Part 2


Thoughts About the Architecture

 

Here is a thought area, defining how your application is architected has a huge impact on how changes are done, and how they affect the rest of the system. It will tell how difficult it its to add new thing, and how easy other people can cooperate, so this cannot be taken lightly at all. Hopefully we will have a sketch of how it should be by the end of this and later we can go further in the details, and specific changes.

The Key Ideas

 

Here are a few things that are desirable in a good system:

  1. Business logic have to encapsulated, bleeding of rules, make the system hard to maintain.
  2. Logic has to be reusable, duplication besides being hard to manage is also prone to errors.
  3. Logic has to be granular, this promotes reuse, and also componentization (Lego pieces like Hanselman would say).
  4. Interoperability, the things you do could be reused in a series of systems/platforms, phones, other websites, win/Linux/mac apps, etc..
  5. Scalable, you never know when your site is going to became the next big thing.
  6. Extendable, it’s a given that new things will be needed.

A popular architecture that has these feature is SOA, some people would even say that if you are starting something new now a days, that you should without a doubt use SOA and nothing else. You should be able to find extensive content in the internets about it.

So there that’s what we will be doing. We will use services, for every part of the site internally and externally.

But How does That Work

 

Every little piece of the site, can be encapsulated into a WCF web service that could further be consumed by the site trough a common interface in a “Service Manager”, which has the responsibility of checking availability, and then execute the request and respond with the appropriate content.

Now is this easy? Not necessarily, the wrapping of this services in this “common interface”, should provide easy access, but will require lots of configurations. Each service would have a configuration file (read data store), describing what methods are available, and what parameters these expect. Further the manager would get the method to be executed, parse the parameters and then execute a call to the service asynchronously.

mockup

Looking at the picture above, you will see on the left side in shades of purple, the “Service Manager”, the discovery part is basically check the availability of the service, by asking: Is the API accessible? Once this is done, then the consumer (“Front-End”), can proceed with execution or gracefully fail by posting a message for example.

In some cases, you might not need a service or you are just consuming structure, like MVC or the menus, for example, so I represented those  in shades of yellow.

The front end in light blue, because of the asynchronous nature of the “Service Manager”, could be entirely written in JScript, but not a must. JScript would allow a more responsive UI, creating more user satisfaction and easiness of consumption.

Last the red bar representing things that will be used in all layers, like authentication, logging, etc.

The Service Architecture

 

Service Architecture

In the picture above you can see, on the top the more common design, where every component can be called from any of the clients, this might create complications when trying to make changes, compose other systems, or even scale some of the functionalities, since, the whole architecture is big block of functionalities.

If you look at some of IDesign documentations you will find that they recommend breaking the architecture in many little services, that would make the problems described above to go away. The addition of he Web API layer, is just a way of abstracting complications when clients communicate with the system, for that you might find different solutions out there (WCF Web API , Service Stack , etc.).

Notice that each service is self contained, it has its own database, business rules, that means that changes there will rarely affect the other systems, making this clearly a good way to promote composability, scalability, extensibility, etc., like we wanted in the beginning of this post.

Obviously this is still a maturing architecture, and as I said before inputs are welcome and I will update the article with more info as I get them.

Also I want to thank Balsamiq  for the cool pictures I have on the post.

What’s next?

Keep Coding.

What’s next: Part 3

The Past : Part 1


Defining the problem

 

Today we have a boom in social networks of different kinds, facebook.com, orkut.com, github.com, are examples of that, and they serve different purposes, and I think that they do that quite well, they have some kind of integration, through authentication strategy, and by sharing “status” on other sites, etc.. Now you can’t go to a single place and consume all the information you want, if you want to know about events, you go, to facebook, google, msevents, etc.,or if you need some code, you go to github, codeproject, codeplex, etc., news you go to some other sites, and podcasts somewhere else. Well that just seems wrong now you have a gazillion favorites and you can’t focus on what you really need to do, which is your work.

Defining the idea

 

The better world would be a place where you go and you get a snapshot of the things you like, make the decision to know more about something, and then move on, right?

So the initial part of this project is to get that going, concentrating that content in a single place, tailored by the user by picking the sources and rating it as its consumed.

Other interesting ideas:

  • Enabling users to contribute by opening the ability to write articles, that also will be rated, and can be multilingual.
    • Articles should be exportable in a format that is open and consumable in multiple devices, like EPUB.
  • User group management portal, I have seen many of those, but they don’t have a content feed to support the managers, also they don’t have a key component, which is hosting a simple page with the user group theme, events ,news, announcements, contact information, etc..
  • A series of handy services that every one could use in their projects (Hummm, that sounds very big and complicated). Imagine that some of the services that we use in the website could be used by you as well, as an API, so if we have rating system you would be able to use it in your website.
  • Add-ins for browsers, exposing the services of the website to browsers and other systems.
  • Client for all different platforms, like phones and tablets, to enable optimal experience were ever you are using it from.
  • Achievements, having this creates a sense of accomplishment, and gives a game idea to participation. Also the more you give the more you get, so getting achievements will give you more power within the system.

Further on new things could be introduced by suggestion and if I get things right we might be able to build it together, building it for the community by the community. Hopefully by this point I got your interested in some piece of the idea, next I will be working on the tools, frameworks, platforms, defining architecture, playing with idea of services, and way more.

Keep coding.

What’s next: Part 2

The Past : Part 0


A while ago I started a user group called DNA, this brought me the task of managing all this, and after going around a whole bunch of times I realized that what I need did not exist, and with that I wanted to create the next best solution (Whatever that means. Smile with tongue out).

So I will try to write up my adventure as I try to solve this problem, so if you stick with me, you might learn a few thing through my experience.

The “series” will be divided in parts, with this being “Part 0”, and with the last part being “Part N”, since this is an unknown territory I believe that I will have many and many parts to the series.

Keep coding.

What’s next: Part 1

Organizing You Brain

Posted: March 30, 2011 in General
Tags: , , ,

Since I can remember I have had ideas, as most of us do, and some how I record that information. Well not really, what I usually would do is have the idea, create a mental note, then evolve the idea every time I would remember it, and keep all that as a mental note. It turns out that I have a pretty good memory and I can remember most things for a very very long time if I care enough about it, but the key is the word “most”, I will remember everything to a certain point and won’t necessarily remember the details, and there lies the problem.

With that in mind I have been trying to evolve this process over the years, and I have done a series of things, like taking actual notes in a word document, or creating the project in Visual Studio, and evolving it by using the diagrams available there, drawing pictures, post its, and many others.

While the methods described above are pretty good they lack features, the word document allows you thoroughly describe you idea, but if long it would be hard to see the overall idea, also it is hard to organize more complex ideas, and there is not a necessary flow. The project, allow you to describe through diagrams and gives you code, but the finer description is harder to get, surely code comments help, but they are not on the diagram. Post its, eventually you run out of place to stick it, and also your wife might clean them up ( This has been there for a year now, its even yellow already ) . Pictures, get lost in the see of files, and apparently you can never name them in good descriptive way, and they lack comments.

That brings us to my latest trial, after talking to a friend and doing some research, there are this tools, that allow you to map your thoughts, and gradually build on top of it with new findings and ideas, the tool I am using is, wait, wait, PersonalBrain (http://www.thebrain.com/), there, I have found that its pretty simple to use, it has a 30 day trial in the full “PRO” version then it downgrades, and you loose some features, but you can still use it normally, they have this online storage if you want too, and it would allow you to share between your computers with little or no effort.

Although this is a tech targeted blog, you can use this to anything in your life, and in a group manner as well, for example in a brainstorming session, you can gather the group/team’s  thoughts with all the benefits. For now I am only using a good brainstorming storage of my ideas, so any time a have sprouts I sit down an Brain it up.

The tool use a very friendly interface, and it will organize things as a Brain, so when you start you create a Brain, then you add thoughts to it, where you could for example put anything that comes to mind, as you think of then, for example, you are creating a dish, and you start by with a “Dish” thought, well now what’s in the dish. Meats? What are the possibilities, pork, chicken? Vegetables? What kind of vegetables, onions, carrots, celery? What about condiments? Hummm, cumin, salt, peppers? The nice thing is this will be represented in a graph form, where as you thing about things, you connect then and organize then in a line of thoughts manner.

Then when you have the basic layout of the thought, you can go back and expand, each of sub thoughts, and deepens the knowledge about each of them with, contacts, links, textual description, other documents like pictures, word documents, and so on. If you have the “Pro” version you will be able, to tell the thought to search more about it self, you click on it, and then you will get a option to search the internet, and it will open you browser and search for you then you revise the returned search and drag and drop the link that you found interesting.

You can also connect thoughts, so if for example you have a though that might help in another though, you can then link both together, so you will have that reference, when refining or solving that problem.

I haven’t fully evaluate, the tool, and also I haven’t looked at the competitors, but I was so amazed by what it brought to me, and the way this was designed that even if I stop right here, I think it would be an amazing benefit over every other attempt that I have done before, and yes, I will be using this from now on to record my thoughts and ideas, and maybe go a little bit further, then just ideas, who knows.

I just wanted to share this little with you guys and recommend that you try it out, it might not be for you but you can only tell after you tried.

I got a fortune cookie the other day that said:

“YOU ARE ADVENTUROUS – RIDE THE HIGHWAY OF LIFE”


I was looking around for alternatives for databases, and came to the idea of “Object Oriented Databases”, and I remember seeing something about this when I was in college and then it disappeared and I did not hear from it till a couple of years ago, and more recently with the “NoSQL” movement.
So the concept is quite simple. You create your classes, instantiate your objects, then you “Open” a connection to your database, and store the object in it.
The advantage is that, all the breaking apart of your objects, that would happen in a “Relational Database”, does not have to happen since your objects are going to be stored as they are. What I mean by that is that a situation where you have a parent table and a child table, would be represented in object as a instance of the parent with a property (Collection) of the children, that when stored in the database would then be broken into one row in the parent table and 0-N rows in the child table. Then when retrieved that process would have to be reversed into the materialization of a object with children again, and this will result in loss of speed.
The other advantage is that when changes are required they are easier to be implemented, and will be done with minor changes to the code.
The DBMS that seems to have the biggest support on the market today is db4objects by Versant, also it seems to be very mature as well with about 11 year on the market. I will be using the .NET 4 version of the database on windows forms.
I will try to illustrate, the process from beginning to end, then I will do some analyses of the supposed benefits.
Downloading and Installing
The official web download page is http://www.db4o.com/DownloadNow.aspx you can go there an get the .NET for version, I strongly encourage you to sign up for the community so you can get support and answers from the people using it.
It’s a small download of about 23mb and should be no trouble.  Run the msi, and configure it as you please, when you finish the installation, go to Start Menu –> db4objects –> db4o 8.0 –> Install ObjectManager VS plugin, this should install a little bar to VS, that allows you to manage your database.
One its all installed you should open your VS and start a new project, then you have 2 options:
  1. Manually reference the DLLs from your install folder
    1. Db4objects.Db4o.dll
    2. Db4objects.Db4o.Data.Services.dll
    3. Db4objects.Db4o.Linq.dll
  2. Use nuget (http://www.nuget.org/)
    1. If you have not installed it yet, do it. (What you waiting for? Zombies?
    2. There are different way of installing packages, but the easiest is
      1. Right click on references folder
      2. Add Library Package Reference
      3. On the left panel click “Online”
      4. Then search for “db4o”
      5. pick “db4o-devel” and hit install
That’s all there is to it, you have all you need installed and configured now you can start your development.
Creating and Opening the Database
To create the database, you will have to use the following line (ex: 1).
ex: 1
IObjectContainer db = Db4oEmbedded.OpenFile(“TestDB”);
This will create the file if it does not exist or it will open if it does exist.
Creating and Storing Objects
Considering the classes Author (ex: 2), Book (ex: 3).
ex: 2
public class Author
{
public string Name { get; set; }
public Guid? Id { get; set; }
}
ex: 3
public class Book
{
public string ISBN { get; set; }
public string Title { get; set; }
public Author Author { get; set; }
}
Once you instantiate the container, you then, can create your object as you would normally, then you call a method called Store() from your container passing as parameter the new object (ex: 4).
ex: 4
Author author = new Author();
author.Id = Guid.NewGuid();
author.Name = “Mateus de Carvalho”;
db.Store(author);
Book book = new Book();
book.ISBN = “VERYAWSOMEISBN”;
book.Title = “Book of Awesome”;
book.Author = author;
db.Store(book);
Retrieving the Objects
There are different ways of getting your objects, one way it to use LINQ.
Get all authors (ex: 5)
ex: 5
var resultQuery = from a in db.Query<Author>()
select a;
Get all books for a author (ex: 6), where the author is one of the objects from the list returned above.
ex: 6
var resultQuery = from b in db.Query<Book>()
where b.Author == author
select b;
Now we will use the type as way to get all authors (ex: 7).
ex: 7
IObjectSet result = db.QueryByExample(typeof(Author));
Now for a given author books, you create a object of book, fill in the properties that you want to match, in this case, the author, and the you execute the query (ex: 8).
ex: 8
Book book = new Book { ISBN = null, Title = null, Author = author };
IObjectSet result = db.QueryByExample(book);
Working with Array Properties
Lets say that you want to sell those books, and to do that you are going to create a Order class (ex: 9), and in that class you will have a list of books you sold. Now the rest you know the drill, create a instance of Order, then for each Book that is sold you add to the Books property of that order (ex: 10).
ex: 9
public class Order
{
public Guid? Id { get; set; }
public DateTime Date { get; private set; }
public int Count
{
get
{
return this._books.Count;
}
}
private IList _books;
public IList Books
{
get
{
return this._books;
}
}
public Order() : this(null, DateTime.Now, new ArrayList())
{
}
public Order(Guid? id, DateTime date, IList books)
{
Id = id;
this.Date = date;
this._books = books;
}
}
ex: 10
ArrayList booksSale = new ArrayList();
booksSale.Add(book1); // Selection 1
booksSale.Add(book2); // Selection 2
booksSale.Add(book3); // Selection 3

Order order = new Order(Guid.NewGuid(), DateTime.Now, booksSale);
db.Store(order);
Then one you sold you want to find the orders based on a given book (ex: 11).
ex: 11
var resultQuery = from o in db.Query<Order>()
where o.Books.Contains(book)
select o;
dgvSales.DataSource = null;
dgvSales.DataSource = resultQuery.ToList();
dgvSales.Refresh();
That gives you a nice idea of how this works, and you can look further for more information in the documentation that is provided with the download you did, and in the community.
Updating Objects
Updating objects is actually quite simple, first you find the object, by one of the ways we talked about already, then you make your property changes and store it again. The engine will make the proper procedure to store the changes to that object (ex: 12).
ex: 12
var author = (from a in db.Query<Author>()
where a.Name = “Mateus Carvalho”
select a).SingleOrDeafult();
author.Name = “Mateus de Carvalho”;
db.Store(author);
Deleting Objects
Well you probably guessed it already, but I will say it any ways. First you retrieve it by any of the means described above (kind of repetitive, hum?), then you call Delete, I knew you knew it (ex: 13).
ex: 13
var author = (from a in db.Query<Author>()
where a.Name = “Jhon Smith”
select a).SingleOrDeafult();
db.Delete(author);
Analyses
Now that we know the basics I will do a couple of things, to see how is the performance on this.
What I will do is as follows
  1. Insert 10.000 Authors
  2. Insert 10.000 Books
  3. Find 3 Books and make 10.000 orders
  4. Repeat steps 1 – 3 in the same database
Time (ms) Time(s) Container
1 813 0.8 Single Use
2 1400 1.4 Single Use
3 5937 5.9 Single Use
4.1 600 0.6 Same
4.2 1982020 1682 Same
4.3 3421 3.4 Same
The testing was done using the windows application (64bit) available with the post, I used the Parallel library to speed up a little, and the machine is a I7, with 6Gb.
Notice in item 4.2 that the is actually really high, I haven’t optimized the code, but the basic reason is that each book inserted I first search the database for a specific author, then create the book for him.
I did not optimize that part of the code, because the situation is highly improbable and I still wanted to see the outcome. A action scenario, the User would choose a author then add a book to that author.
If you are processing data in memory I would recommend, preparing the “data set” before starting the processing, in this you will not be constrained by IO speed.
Obs: If you are going to process a really large amount of data, remember that .NET 32bits will have a limit on the number of handles it can use, which will cause an OutOfMemmoryException. To go around this problem you can change you application to run under 64bits and it should stop, but eventually you will consume you ram and the process is going to slow down a lot.