jueves, 5 de diciembre de 2013

Windows 8.1 - The good look and feel OS!



Intended for: All kind of users

As it is becoming usual, Microsoft has bring us a simple, beautiful and optimized to the top in order to make our daily tasks.

Is true: Windows Vista was a bitter taste that remember to that marvellous version of Windows called Millenium and its less than a year lifetime (because it smells like shit), bringing to the front to XP. Windows Vista performance was very bad because aero interface eats lots of resources of our old machines (not as resource-skilled as today).

The time has passed and our loved Windows 7 was better than before. Everything was working as a swiss-clock, more optimized and with the same aspect than Vista, but better made.

Now we have a version that optimizes better the resources, we ha a Windows 8.1 more intended for the general public. The idea of showing again Start Menu (in version 8 they have removed it, big mistake!), they move the interface to big and short set of buttons and with sort texts. If you are a common Windows user you need to take some time to understand the new Windows standard's of use; moreover menus are intended for tactile interfaces: but is the same, is amazing to see how the did it!

I have to recognize that I have one of this at home (completely legal) and I have to say that I'm amazed with it. Bring an opportunity to Redmond guys!!!

One more thing: Microsoft HAVEN'T hire me!!!
Windows

miércoles, 27 de noviembre de 2013

Delegates and Lambda Expressions... fearless

Intended for: .NET medium-skilled developers

Delegates


Before we start this entry, we have to warn you about this is not a book so, we don't explain with details this theme. Its frequent to watch developers with fear to this concepts because are hard to understand even with a book in your hands. I've try to explain this in a simple way.


A deletate is a function definition to be used as a parameter to other one. Is as easy as the previous phrase explains it. Maybe you can find better explained definitions about delegates; but they could be more confusing than this.

public delegate bool DelegateFunction(int parameter1, int parameter2);

This is the way to declare a delegate, is enough. It is usefull as a "shell" to be passed as parameter another function with this kind of declaration: two integers as entry and a boolean as returned type.

Now I'm going to create a function that uses the delegate as parameter:

public string ExampleFunctionWithParameterDelegate(DelegateFunction df, int p1, int p2)
{
if (df(p1, p2))
{
return String.Format("Function condition accomplished df using {0} and {1}",
                    p1,
                    p2);
}
return String.Format("Function condition NOT accomplished df using {0} and {1}",
                    p1,
                    p2);
}

This drives us to understand how delegates works. Now we have to create functions that have the entry and return parameters as follows:

public bool DelegateExampleFunctionP1IsLessThanP2(int parameter1, int parameter2)
{
return parameter1 < parameter2;
}

public bool DelegateExampleFunctionP1IsMoreThanP2(int parameter1, int parameter2)
{
return parameter1 > parameter2;
}

Now, we have to connect everything with the following calls:

var p1 = 5;
var p2 = 2;
var returned1 = ExampleFunctionWithParameterDelegate(
DelegateExampleFunctionP1IsLessThanP2, p1, p2);
var returned2 = ExampleFunctionWithParameterDelegate(
DelegateExampleFunctionP1IsMoreThanP2, p1, p2);


Can you imagine what are the values for the variables returned1 and returned2 after the execution of the instructions? These values are the following ones:

returned1 = "Function condition NOT accomplished df using 5 and 2"
returned2 = "Function condition accomplished df using 5 and 2"

As we can see, this allows us to make flexible functions, even "mutants". Now I'm going to explain Lambda expressions, using the same example as delegates.

Lambda Expressions


Following the previous idea here is an example of Lambda expression that is usefull  to know how they work, making comparitions with the previous develop I've mark in yellow Lambda expressions:


var returned1 = ExampleFunctionWithParameterDelegate(
DelegateExampleFunctionP1IsLessThanP2, p1, p2);
var lambdaReturned1 = ExampleFunctionWithParameterDelegate(
(parameter1, parameter2) => { return parameter1 < parameter2; }, 
         p1, p2);

var returned2 = ExampleFunctionWithParameterDelegate(
DelegateExampleFunctionP1IsMoreThanP2, p1, p2);
var lambdaReturned2 = ExampleFunctionWithParameterDelegate(
(parameter1, parameter2) => { return parameter1 > parameter2; },
p1, p2);


We observe that the difference between the previous delegates code and now is that now we don't need the auxiliary created functions, I've made it "on the fly" and without direct define inside the call parameters of the call of main function with the delegate.

As you can imagine, the following is the result that is the same than the previous one:

returned1 = "Function condition NOT accomplished df using 5 and 2"
lambdaReturned1 = "Function condition NOT accomplished df using 5 and 2"
returned2 = "Function condition accomplished df using 5 and 2"
lambdaReturned2 = "Function condition accomplished df using 5 and 2"

Lambda expressions and delegates are implemented in several functionallities inside the framework elements. One of the most frequent places to be founded is inside the objects of System.Collections.Generic class, for example inside the lists and it will be usefull to be used in the querys over that collections.
C# and Developing

jueves, 14 de noviembre de 2013

Secure File Deletion under Windows - File Predator



Intended for: all kind of users


I don't want to scare you but, Windows file deletion (and its recycle bin deletion) IS NOT SAFE. In fact, it never have been secure, so you have to take care with your files when you use a classic file deletion your files never be really deleted until that files where completely overwritten.

Before starting this entry, I will explain how Windows delete the files over hard disk, in order to understand why is so important to delete files in a correct manner, more important if you send to trash the hard disk itself. I have to explain that I'm using my memory to recover the Operating System's of my carreer so the explanation couln't be a hundred percent accurate; my idea is to explain to anyone without a big set of details. I accept any comment to improve this post.

Cómo se distribuyen los ficheros a lo largo del disco duiro
In a Windows OS (same than Linux) files are stored in the hard disk in a sequential mode (this is not exactly, but approximately). Everything are bit sequences (zeros and ones). Part of this information is the i-node that
is readed by operating system to identify the basic information of the file: the memory position where the file starts and their metadata as the file lenght.
Dos ficheros eliminado en el anterior esquema del disco duro
The only thing that Windows do is to remove the i-node  in both steps (send to bin and cleanup it) and the files are kept in the hard disk until Windows overwrites the data with new one. This can happen in a short time or... never!!!
Cómo las aplicaciones recuperan los datos

There are lots of simply and cheap tools (even free) that are capable to recover these data after formatting the hard disk (always if is not a low level format), beacuse of that I repeat: Windows data deletion IS UNSAFE. That tools read the hard disk and test which files are i-node orphans and recreate a new one for them in order to Windows shows them normally. If that files aren't overwrited partially or totally, restore applications make the file recover. About these recovery tools we talk in the following post: How to recover lost files; but now we are looking at the safe file deletion.

Presentación File Predator
To help us to cleanup our files in a safe way, I have take the chance of create an application by myself.There are more and different, and not free. Mine is free an you can download it here:


Before start you have to be agree with these points and the agreement inside the application files:

  • This application is totally free and you can't pay or sell it. This is a non commertial application.
  • You can put it in any website, but remember that you have to link to this blog and the entry post. You can't modify the content inside the rar file inside my web and the license file inside them.
  • Use it carefully! If you erase something with this application you'll never can recover them!
  • You're using this UNDER YOUR OWN RESPONSIBILITY.
  • I don't have any responsability on any trouble that you can have: not viruses inside the exe files, not errors of the application itself and not human errors during the application management.
If you're not agree with the previous, don't download it and don't use it! I'm completely clear: is not my problem. This is a present for you, it costs to me effort and work and I bring to you "AS IS". Of course I will always trying to make a free-bug application but, as everyone knows, there are lots of bugs that make big companies loose lots of money; so obviouslly a free application could contain it (sure it have). If you detect fails and want to report them, please comment at the end of this post.

The use of application is very simple and intuitive, I left it to you in order to you discover it and is further posts I'll explain you how to do it. I left the compilation to be uncompressed (in rar format) and in next posts I'll explain you how to use it, .NET framework 4.0 is requiered.

In next entries I'll explain how to make your own secure file deletion algorithms to add to your application. Don't lose this opportunity!


Windows

martes, 3 de septiembre de 2013

Protect your PC from viruses and other trash FOR FREE



Intended for: Rookies

I have been watching the lack of knowledge and even people clumsilness in the protection of their own PC's. I don't want to scare anyone but is HARDLY DANGEROUS use a PC with a Windows OS without a suitable protection. I compare this with having bunny-like sexual relations in the middle of Africa without using comdoms... sounds hard? Is what it is, hard as life.

When you buy a PC, it could have or not a demo version of any protection that they used to finally charge
to your account. This protection costs about 50€ or even more for a year subscription. In that moment you don't receive new viruses definitions so, your machine starts to collapse!

A virus as a simplified description is an application that pretends to make troubles in your machine and infecto files in order to not being removed and turn them useless. An spyware application is a software designed for get your personal information and send it to other people for obvious reasons.

There are people that makes this work totally free (I'm one of these, but outside my work) and publishes antivirus and anti-spyware for free. Today I'm going to show you two totally free applications that I used to use diary and work very well.

Before start to install, we have to uninstall previous antivirus versions that we have. Two antivirus in the same machine makes conflicts and it could be possible to have to reinstall the OS. For that poupose we have to go Control Panel, Add or remove programs (in newer Windows, Programs) and find in the list the application to remove, selecting it and clicking over Uninstall. There is an antivirus which uninstall is a complete caos: Norton antivirus in any version. They have their own application to do this and here you can download it: Symantec Removal Tools

Once uninstalled, we have to download this software:



Why this applications and no other one? The antivirus is provided from Microsoft and is more efficient than othe applications (my experience is that it works fast as a bullet, your user experience is not affected). It's true that they could be not as updated to virus definitions as companies that make this work, but they're serious.

Spybot S&D is an old application and is for home users totally free.

Other possitive point for them is the user's ignorance, I mean that the user doesn't have to make anything until applications detect any anomalous behaviour.

All this protection is enough for a normal internet use (not for pirate pages or bizarre pornography).

Never use your PC without any protection, you maybe regret.
Windows

viernes, 23 de agosto de 2013

I want feedback!


This blog is beign accepted very well! I love this! But I have to ask you for some help: I want to know your opinion about my posts. Please, comment in the footer of the articles everything that you think: for me is the most important thing.

Thank you very much for your help,
 Enrique Diaz
Info

miércoles, 21 de agosto de 2013

Is your Windows running abnormally slow?

Intended for: all kind of users


Since ancient times (1994, when my first PC appears at home) a question was around my head: why Windows lost performance in time?

Today I know the answer to that question: Windows registry and the trash that user's often install (me included) with nosense services are the root of this problem.

Windows Registry is the basement of the operating system. To clarify the concept, is a big database that contains information of all installed applications inside the system, moreover contains information about processes and services in the system. The advantage of having all stored in the same place is that everyone knows where to find; the problem is that the access to the registry started to be slow when the data stored volume is big... Whe started to have clues, am I wrong?

What is th first solution to that problem? Is simple: reinstall Windows. This is the optimum solution but you have to take care when is reinstalled to not install again useless applications; in other way, you'll have soon the same problem. Moreover, before reinstalling you have to make a complete data backup, which is boring. This solution is recommended when the problem is very serious: machine takes three times than normal or worse in start than when we bought it.

When I was working in PC City (now Worten) I get other pretty good solutions (very profitable for them, its normal that they went wrong) always when the problen is not very big. For the Windows Registry cleanup there are several applications intended for maintenance of the machine too. The following are examples:
  • CCleaner: only cleans the Windows registry and is intended for uninstall applications too. The advantage: completely free. Highly recommended.
  • TuneUp Utilities: this is a complete suite to maintenance and optimize your PC. The problem? You have to pay for it. There is a trial version in their web and the price for the complete one is surrounding 30€. Highly recommended too for this and for the following explained.
Running services are the other part of the problem. Often applications install without advise Windows services which function is not very clear and used to be started when Windows starts by default. With suites such as TuneUp we can stop this processes without affect to the system stability, but there is a manual way to do this, a little bit more rude but with the same effect on Windows.


To manually stop services, the first thing to do is to click over the keys Windows+R.
Para la parada manual de servicios, lo primero que tenemos que hacer es pulsar la tecla Windows + R.


In the textbox, we have to type services.msc.


Right click over the services that we suspect are useless and select Properties tag.


We change the startup kind to Manual or Disabled. After that whe have to click over OK button and the window will be closed.

We have to repeat the previous process the times that we consider over all services that we think are completely useless. Just remember: don't touch any Microsoft service.

At the end, restart the machine and watch the effects of the changes.

In PC City, people pay about 30€ foreach service like that... I accept donations!
Windows

How to: create at home a Windows server with small machines (any SO is accepted)

Intended for: all kind of users

Have you got at home any useless PC's that you think you'll never use it again?

This is the second post in this blog, and here I'll explain how to reuse this machines with a little bit imagination...

The content of the present document can be reproduced at home by anyone that is interested on it. It's not difficult to make (it only takes a sort time) and it allows you reuse machines that you think you have to waste... it's not good, isn't it? Moreover, in current times it's better to not send to trash anything. Any kind of help you need is allowed, post them on comments.

I have at home two machines: an Asus laptop with an i7 core and 12 GB of RAM and a small laptop with an Atom processor and 1Gb of RAM.

To make this post possible, you'll need at least two machines: one small-resourced machine (as my atom) and one with good resources capable to support clients.

The net topology will be the following (example for three machines, three users and a server):

Topología de la red doméstica

The first step to take is to determine wich machine will be the server. Obviouslly that we have to select for beign the server the machine that have the biggest resources in the set of your machines. In my case, I select the i7 with a Windows 8 Operating System.



Cuentas de usuario en Windows 8


Once we locate the server, we have to determine how much people have to use the server and we have to create at least an account foreach machine that we want to connect. We have to open Control panel, User Accounts, Manage Accounts and at this point we have to add the accounts previously mentioned. Reached this point, we have to make the steps of the previous post Multiuser with Terminal Services. If you don't do that, it will not work for more than one user.

Machine name change in Windows


Another important thing is that we have to put a simple name to server in order to remember it easily, as SERVER could be. This will be good in advance. For example, using Windows 8 you can change this configuration in Configuration, Pc Info, Advanced System Configuration, Machine Name, Change.

Client example in Windows
 Linux client example


In small machines we have to install an OS (if is not installed a good one) that best fits in them. There are Windows and Linux version that have Terminal Services clients and they can connect perfectly with the server. This machines are only intended for beign clients so, as lighther is the OS for them better will work everything. If you want a small Linux, I reccommend Damm Small Linux or Puppy Linux, but you'll need knowledge in that operating systems to keep it working at a hundred percent (I can't support you in this task, sorry). The best one, a Windows XP machine: if you know it, you love it for this.

There are a few basic things to go: in the client machines we have to select the account to be automaticaly opened without introducing a user and a password. This is because any data will be stored in the client machine: they will be stored in the server. The server will be always-autenticated in order to preserve the user's data. I don't reccommend this practise if the client machines will be used to navigate directly or to use and move any kind of data; but using the server directly makes you gain lots of time.

Terminal Services fully configurated

The last step is to configure the Terminal Services client. To do that, we have to put the server name (for example SERVER) and clic over Connect. If everything is well, in a few seconds we have granted the access to the server as we are local users, but we will be remotely connected and our small machines will have all the resources of the big one.

Windows

lunes, 19 de agosto de 2013

Multiuser with Terminal Services (for Windows Vista, 7 and 8)

Intended for: all kind of users
We start this blog creating an entry point that more than one of us have headache with it: How make Windows remote desktop conection (aka terminal services) fits to two or more users?
By default, Microsoft provides Terminal Services configurated for only one connection and only one user. This means that we have a machine with a number bigger than one user but at the same time only one of them could be working... A little bit moron, am I wrong? People like me, that worked in the past with Unix/Linux environments, are used to have this functionallity by default, making the machines work to their limits and having well-managed their resources. Redmond OS PC's must have the same functionallity, they must be multitask and multiuser.
Someone has taken the trouble and fixes this failure to make a well managed machines independently the operanting system installed and its version (32 or 64 bits).
In the following link you can download the file that corresponds with your operating system and we have to execute with a console command in an administrator mode (right button click and single click over Execute as an Administrator...) in the containing batch file (.bat). There is no patch available yet for Windows 8.1. If you have one working, please share it!
Patch for Terminal Services (* read foot note before downloading)

An important particularity is that in the Windows Vista version we have to add manually a Windows Firewall exception in the port 3389 (terminal services port); in other versions is opened in an automatic way.

This things will be helpfully and its intended for the following article that will be published as soon as possible: How to create a server at home with small machines.

* WARNING: besides this file has been analized in order to find viruses and other kind of malware, the author of the article is not responsible of any kind of trouble that this files could make in your machines. Please, use them at your own risk.
Windows

 

Friendly Websites:

  • Manuel Enrique Díaz Rodríguez
  • CuRadio
  • Copyright © DotNet Pathways 2015
    Distributed By My Blogger Themes | Designed By Templateism